char *def_startup[] = {
"if -e $ZMLIB/license/license.zrc",
"source $ZMLIB/license/license.zrc",
"endif",
"setenv HOME $home",
"setenv PATH \"${ZMLIB}/bin:${PATH}\"",
"if hdrs_only",
"set summary_fmt='%22a %M %-2N %T  %.31s'",
"else",
"if is_lite",
"set summary_fmt='%22n %M %-2N %5T (%l) %s'",
"else",
"set summary_fmt='%22n %M %-2N %5T (%l) %.25s'",
"endif",
"endif",
"priority Urgent=6 High=7 Medium=8 Low=9",
"if -e $ZMLIB/lock.zmailrc",
"source $ZMLIB/lock.zmailrc",
"endif",
"if $?LANG",
"if -e $ZMLIB/locale/$LANG/locale.zmailrc",
"source $ZMLIB/locale/$LANG/locale.zmailrc",
"else",
"set prompt=\"(%T) %f: #%m of %t> \"",
"set pre_indent_str='On %M %N, %T, %.50n wrote:\\n> Subject: %.65s'",
"set indent_str='> '	# actual message text is preceded by a \">\"",
"set post_indent_str='>-- End of excerpt from %.50n\\n'",
"if ! is_lite",
"set main_status_bar_fmt = 'w6,s;w4,c,f%t total, %n new, %u unread, %d deleted'",
"set comp_status_bar_fmt = 'w475,s;w125,c,f%f%.;w400,c,f%t total, %n new, %u unread, %d deleted'",
"set msg_status_bar_fmt  = 'w475,s;w125,c,f%f%.;w400,c,f%t total, %n new, %u unread, %d deleted'",
"endif",
"endif",
"else",
"set prompt=\"(%T) %f: #%m of %t> \"",
"set pre_indent_str='On %M %N, %T, %.50n wrote:\\n> Subject: %.65s'",
"set indent_str='> '	# actual message text is preceded by a \">\"",
"set post_indent_str='>-- End of excerpt from %.50n\\n'",
"if ! is_lite",
"set main_status_bar_fmt = 'w6,s;w4,c,f%t total, %n new, %u unread, %d deleted'",
"set comp_status_bar_fmt = 'w475,s;w125,c,f%f%.;w400,c,f%t total, %n new, %u unread, %d deleted'",
"set msg_status_bar_fmt  = 'w475,s;w125,c,f%f%.;w400,c,f%t total, %n new, %u unread, %d deleted'",
"endif",
"endif",
"function load_custom_overrides () {",
"if -e $ZMLIB/custom.zmailrc",
"source $ZMLIB/custom.zmailrc",
"unfunction load_custom_overrides",
"endif",
"}",
"if hdrs_only",
"load_custom_overrides",
"return	# Quits reading this file",
"endif",
"set picky_mta += omit_commas",
"ignore message-id received via status priority precedence x-zm-priority",
"ignore references resent-message-id return-path return-receipt-to",
"ignore mime-version content-type content-transfer-encoding",
"ignore content-length content-lines content-identifier",
"ignore encoding x-vue-version",
"ignore x-face x-key-digest x-zmuid",
"ignore *Error* Content-* X400* Encoding*",
"if is_gui",
"retain From Date Subject Name Reply-To Resent-[FDTC]* To Cc",
"ignore From From* Date Subject Name To Cc	# From* hits \"From \" line",
"set display_headers = unignored",
"endif",
"if is_lite",
"retain From Date Name Subject Reply-To Resent-[FDTC]* To Cc",
"ignore From From* Date Subject Name		# From* hits \"From \" line",
"set display_headers = unignored",
"endif",
"if ! $?print_cmd",
"set print_cmd = \"$ZMLIB/bin/mailp -W80 %O\"",
"setenv MP_PROLOGUE \"$ZMLIB/mp\"",
"endif",
"set history = 100",
"set unix",
"set in_reply_to='%f\\n\\t\"%s\" (%d)'",
"function resend() {",
"mail -send -forward $*",
"}",
"function saveit() {",
"if \"x$_save_file\" == \"x\"",
"eval ask -f __save_file -d +/. \"Saving: $*\"",
"else",
"ask -f __save_file -d \"$__save_file\" \"Saving: $*\"",
"endif",
"if $status == 0",
"save $* \"$__save_file\"",
"endif",
"}",
"function bugreport() {",
"mail -p bugs		# mail using prepared bugreport form",
"}",
"function view_msg() {",
"if $# == 1",
"open -T \"$1\"",
"if $status == 0",
"pinup ^",
"else",
"return $status",
"endif",
"else",
"eval error \"$0 failed: takes only one argument\"",
"endif",
"return 0",
"}",
"function view_fldr() {",
"if $# != 1",
"eval error \"$0 failed: takes only one argument\"",
"return 0 # Suppress attachment error dialog",
"endif",
"if $?main_state:(folder_writable)",
"ask -m -i __how -d \"Merging into current folder\" \"Display folder by:\" \\",
"\"Saving into new folder\" \"Viewing as temporary folder\"",
"if $status != 0",
"return 0",
"endif",
"else",
"ask -m -i __how -d \"Viewing as temporary folder\" \"Display folder by:\" \\",
"\"Saving into new folder\"",
"if $status != 0",
"return 0",
"endif",
"endif",
"unset __list",
"if \"$__how\" == \"Merging into current folder\"",
"merge \"$1\" | set __list",
"if $status != 0",
"return 0",
"endif",
"else",
"open -T \"$1\" | set __list",
"if $status != 0",
"return 0",
"endif",
"if ! $?__list",
"close -n \"$1\"",
"return 0",
"endif",
"if \"$__how\" == \"Saving into new folder\"",
"ask -f __vf_folder \"Enter folder to write:\"",
"if $status == 0",
"copy * $__vf_folder",
"unset __list",
"open $__vf_folder | set __list",
"set __status == $status",
"close -n \"$1\"",
"if $__status != 0",
"return 0",
"endif",
"else",
"close -n \"$1\"",
"endif",
"endif",
"ask -l __list -d 1 \"Display which message?\" $__list ",
"if $status == 0",
"pinup $__list",
"endif",
"endif",
"return 0",
"}",
"function page_edit() {",
"sh touch $1",
"page -e $1",
"}",
"set __default_lookup_pattern = '.*'",
"function lookup() {",
"if ! $?address_book",
"error \"No address_book set.\"",
"return",
"endif",
"if is_gui",
"dialog Browser",
"return",
"endif",
"if is_lite",
"dialog Browser",
"return",
"endif",
"if $?1",
"set __lookup_pattern = \"$*\"",
"else",
"set __lookup_pattern = \"$__default_lookup_pattern\"",
"endif",
"sh $address_book -1 \"$__lookup_pattern\"",
"}",
"function window_sh() {",
"if is_lite",
"builtin screencmd -p builtin sh \"$1\" \"$2\" \"$3\" \"$4\" \"$5\" \"$6\" \"$7\" \\",
"\"$8\" \"$9\" \"$10\" \"$11\" \"$12\" \"$13\" \"$14\" \"$15\" \"$16\" \"$17\" \\",
"\"$18\" \"$19\" \"$20\" \"$21\" \"$22\" \"$23\" \"$24\" \"$25\"",
"return $status",
"endif",
"if is_gui",
"if $?window_shell",
"set __window_shell = \"$window_shell\"",
"else",
"set __window_shell",
"endif",
"if X\"$__window_shell\" == X",
"set __winterm",
"if $?winterm",
"if X\"$winterm\" != X",
"set __winterm = \"$winterm\"",
"endif",
"endif",
"if X\"$__winterm\" != X",
"set __window_shell = \"$__winterm -e\"",
"else",
"set __window_shell = \"xterm -e\"",
"endif",
"endif",
"builtin sh $__window_shell \"$1\" \"$2\" \"$3\" \"$4\" \"$5\" \"$6\" \"$7\" \\",
"\"$8\" \"$9\" \"$10\" \"$11\" \"$12\" \"$13\" \"$14\" \"$15\" \"$16\" \"$17\" \\",
"\"$18\" \"$19\" \"$20\" \"$21\" \"$22\" \"$23\" \"$24\" \"$25\"",
"return $status",
"endif",
"builtin sh \"$1\" \"$2\" \"$3\" \"$4\" \"$5\" \"$6\" \"$7\" \\",
"\"$8\" \"$9\" \"$10\" \"$11\" \"$12\" \"$13\" \"$14\" \"$15\" \"$16\" \"$17\" \\",
"\"$18\" \"$19\" \"$20\" \"$21\" \"$22\" \"$23\" \"$24\" \"$25\"",
"return $status",
"}",
"function zmfilter_reply_each () {",
"setenv SUBJECT \"$[%s]\"",
"sh \"sed 's/\"'\\$SUBJECT'\"/'\"'\"$SUBJECT\"/'\" $1 > /tmp/reply$$\"",
"unsetenv SUBJECT",
"if $?autoinclude",
"set __need_autoinclude",
"unset autoinclude",
"endif",
"reply -unedited -draft /tmp/reply$$",
"if $?__need_autoinclude",
"set autoinclude",
"unset __need_autoinclude",
"endif",
"return 0",
"}",
"function zmfilter_reply() {",
"foreach m $input 'msg_list - $m ; zmfilter_reply_each $1'",
"}",
"function view_external () {",
"if !$?METAMAIL_PAGER",
"if $?PAGER",
"if \"$PAGER\" == more",
"setenv METAMAIL_PAGER 'more -w'",
"else",
"setenv METAMAIL_PAGER \"$PAGER\"",
"endif",
"else",
"setenv METAMAIL_PAGER 'more -w'",
"endif",
"endif",
"if \"$2\" == \"x-removed-by-recipient\"",
"error \"This attachment has been removed by the recipient.\"",
"return 0",
"else",
"window_sh \"$zmlib/bin/showexternal\" \"$1\" \"$2\" \"$3\" \"$4\" \"$5\" \"$6\" \"$7\"",
"return $status",
"endif",
"}",
"function trustable_address() {",
"if \"$1\" !~ \"*|*\"",
"if \"$1\" !~ \"*[ 	<,][+/~]*\"",
"return 0",
"endif",
"endif",
"builtin eval builtin error \"Ignoring suspicious address \"'\"'\"$1\"'\"'\".\"",
"}",
"function trusted_mailto () {",
"builtin mail",
"trustable_address \"$1\"",
"if !$status",
"builtin compcmd to \"$1\"",
"endif",
"builtin compcmd subject \"$2\"",
"if \"x$3\" != \"x\"",
"builtin compcmd append-text \"$3\"",
"endif",
"}",
"function trusted_sendfile () {",
"trusted_mailto \"$2\" \"$3\" \"$4\"",
"builtin compcmd attach-file \"$1\"",
"}",
"function follow_url() {",
"set WS=\" $(\\t\\n)\" ws=\" $(\\t)\"",
"match \"^\\(.\\)*\\([^${WS}]*[${ws}<]\\)*\\<\\([Uu][Rr][Ll]:\\)*\\([^${WS}:]+://[^${WS}>]+\\(/\\|\\>\\)\\)\\(.\\)*\" \"$1\"",
"if $status == 0",
"echo \"Sending $__match_4 to Web browser.\"",
"if $?browser",
"sh $browser \"$__match_4\"",
"else",
"sh $ZMLIB/bin/tell-netscape openURL \"$__match_4\"",
"endif",
"else",
"match \"^\\(.\\)*\\([^${WS}]*[${ws}<]\\)*\\(url:\\)*mailto:\\([^${WS}>]*\\)\\>?\\(.\\)*\" \"$1:l\"",
"if $status == 0",
"mail -s \"$%s\" \"$__match_4\"",
"else",
"match \"\\([Ww][Ww][Ww]\\)\\.\\(.*\\)\" \"$1\"",
"if $status == 0",
"echo \"Sending $__match_0 to Web browser.\"",
"if $?browser",
"sh $browser \"$__match_0\"",
"else",
"sh $ZMLIB/bin/tell-netscape openURL \"$__match_0\"",
"endif",
"else",
"error \"The selection doesn't look like a URL to me.\"",
"endif",
"endif",
"endif",
"return $status",
"}",
"filter  high_priority_1 'mark -G' -i -h X-Priority \"1\"",
"filter  high_priority_2 'mark -G' -i -h X-Priority \"2\"",
"filter  low_priority_4 'mark -L' -i -h X-Priority \"4\"",
"filter  low_priority_5 'mark -L' -i -h X-Priority \"5\"",
"function convert_zm_to_x_priority() {",
"compcmd insert-header:off X-Priority:",
"compcmd get-header X-Zm-Priority",
"if $?header_value",
"if \"$header_value\" =~ *Low*",
"compcmd insert-header X-Priority: \"4 (Low)\"",
"endif",
"if \"$header_value\" =~ *High*",
"compcmd insert-header X-Priority: \"2 (High)\"",
"endif",
"endif",
"}",
"interpose -operation send convert_zm_to_x_priority",
"if $?LANG",
"if -e $ZMLIB/locale/$LANG/zmail.menus",
"source $ZMLIB/locale/$LANG/zmail.menus",
"else",
"function zm_confirm_read() {",
"set acks = \"$[%?status?]\"",
"set is_unread_mail = 0",
"if \"X$acks\" =~ *!*",
"set is_unread_mail = 1",
"endif",
"if \"X$acks\" =~ *N*",
"set is_unread_mail = 1",
"endif",
"if \"X$acks\" =~ *U*",
"set is_unread_mail = 1",
"endif",
"if $is_unread_mail > 0",
"set read_receipt_requested = 0",
"set acks = \"$[%?X-Chameleon-Return-To?]\"",
"if \"X$acks:1\" !~ \"X\"",
"set read_receipt_requested = 1",
"endif",
"if $read_receipt_requested > 0",
"reply -subject \"Confirm Read: $[%s]\" -send -file $ZMLIB/receipt.zmailrc",
"flags -r",
"endif",
"endif",
"}",
"interpose -operation display zm_confirm_read",
"filter -n pinup_tagit 'pinup' -i -h X-Chameleon-TagIt Tag",
"filter -n pinup_phone_tag 'pinup' -i -h X-Chameleon-PhoneTag Tag",
"ignore X-Chameleon*",
"function zm_compose_tag_it() {",
"mail",
"set compose_state += tag_it",
"}",
"function zm_compose_phone_tag() {",
"mail",
"set compose_state += phone_tag",
"}",
"function zmenu_last_arg() {",
"eval set __l_arg = '$'$#",
"} ",
"function zmenu_match_sender_charset () {",
"compcmd get-header References",
"if $?header_value",
"zmenu_last_arg $header_value",
"pick +1 -h Message-ID $__l_arg",
"if \"x$output\" == \"x\"",
"echo -d \"Couldn't find message $__l_arg\"",
"return",
"endif",
"set __cs = \"\"",
"detach -info param-charset __cs ",
"if \"x$__cs\" == \"x\"",
"compcmd charset \"$incoming_charset\"",
"else",
"compcmd charset \"$__cs\"",
"endif",
"else",
"echo -d \"This composition is not in response to an existing message\"",
"endif",
"}",
"function zmenu_override_in_charset () {",
"set __saved_incoming_charset = \"$incoming_charset\"",
"set incoming_charset = \"$1\"",
"set __override_charset_label = \"$1\"",
"if '?$display_headers:(all)'",
"Print",
"else",
"print",
"endif",
"set incoming_charset = \"$__saved_incoming_charset\"",
"unset __saved_incoming_charset __override_charset_label",
"}",
"function zmenu_insert_file () {",
"ask -f __file \"Double click on a directory in the list below to open it.  Select$(\\n)the file you want to include in your message.  Then click on [Ok].\"",
"if $status == 0",
"if $1 == replace",
"textedit set-item compose-body",
"textedit delete-all",
"endif",
"compcmd insert-file \"$__file\"",
"unset __file",
"endif",
"}",
"set __save_file=''",
"function zmenu_save_to_file () {",
"if \"x$__save_file\" != \"x\"",
"ask -f __save_file -d \"$__save_file\" \"Double click on a directory in the list below to open the one in$(\\n)which you want to write the file. Enter the desired name in the$(\\n)\"'\"'\"File\"'\"'\" field, and click on [Ok].\"",
"else",
"ask -f __save_file \"Double click on a directory in the list below to open the one in$(\\n)which you want to write the file. Enter the desired name in the$(\\n)\"'\"'\"File\"'\"'\" field, and click on [Ok].\"",
"endif",
"if $status == 0",
"compcmd save-to-file \"$__save_file\"",
"if $status == 0",
"echo 'Saved to \"'\"$__save_file\"'\".'",
"endif",
"endif",
"}",
"set __draft_file=''",
"function zmenu_save_draft () {",
"if \"x$__draft_file\" != \"x\"",
"ask -f __draft_file -d \"$__draft_file\" \"Draft file to write:\"",
"else",
"ask -f __draft_file \"Draft file to write:\"",
"endif",
"if $status == 0",
"compcmd save-draft \"$__draft_file\"",
"if $status == 0",
"echo \"Saved draft to \"$__draft_file\".\"",
"endif",
"endif",
"}",
"function zmenu_next_ref_subj () {",
"msg_list . | set __msgno",
"set __subj=\"$[%S]\"",
"if \"x$__subj\" == \"x\"",
"error \"Message $__msgno has no subject.\"",
"unset __msgno __subj",
"return",
"endif",
"search +2 -1 -r .-$ -s -n -e \"$__subj\"$",
"if \"x$output\" == \"x\"",
"error 'No next message about \"'\"$__subj\"'\".'",
"else",
"if \"$output\" == \"$__msgno\"",
"error 'No next message about \"'\"$__subj\"'\".'",
"unset __msgno __subj",
"else",
"msg_list - $output | display",
"endif",
"endif",
"}",
"function zmenu_prev_ref_subj () {",
"msg_list . | set __msgno",
"set __subj=\"$[%S]\"",
"if \"x$__subj\" == \"x\"",
"error \"Message $__msgno has no subject.\"",
"unset __msgno __subj",
"return",
"endif",
"search -2 +1 -r ^-. -s -n -e \"$__subj\"$",
"if \"x$output\" == \"x\"",
"error 'No previous message about \"'\"$__subj\"'\".'",
"else",
"if $output == $__msgno",
"error 'No previous message about \"'\"$__subj\"'\".'",
"else",
"msg_list - $output | display",
"endif",
"endif",
"}",
"function zmenu_all_ref_subj () {",
"msg_list . | set __msgno",
"if \"x$[%S]\" == \"x\"",
"error \"Message $__msgno has no subject.\"",
"unset __msgno",
"return",
"endif",
"unset __msgno",
"search -s -n -e \"$[%S]\"$",
"}",
"function zmenu_next_ref_auth () {",
"msg_list . | set __msgno",
"set __auth=\"$[%a]\"",
"search +2 -1 -r .-$ -n -f \"$__auth\"",
"if $output == $__msgno",
"error 'No next message from \"'\"$__auth\"'\".'",
"else",
"msg_list - $output | display",
"endif",
"}",
"function zmenu_prev_ref_auth () {",
"msg_list . | set __msgno",
"set __auth=\"$[%a]\"",
"search -2 +1 -r ^-. -n -f \"$__auth\"",
"if $output == $__msgno",
"error 'No previous message from \"'\"$__auth\"'\".'",
"else",
"msg_list - $output | display",
"endif",
"}",
"function zmenu_all_ref_auth () {",
"search -n -f \"$[%a]\"",
"}",
"function zmenu_next_ref_msgid () {",
"msg_list . | set __msgno",
"set __mid=\"$[%i]\"",
"if \"x$__mid\" == \"x\"",
"error \"Message $__msgno has no Message-Id.\"",
"unset __msgno __mid",
"return",
"endif",
"search +1 -r .-$ -h references,in-reply-to -n -e \"$__mid\"",
"if \"x$output\" == x",
"error \"No next message that references this message.\"",
"else",
"msg_list - $output | display",
"endif",
"}",
"function zmenu_prev_ref_msgid () {",
"if \"x$[%?references?]\" == x",
"error \"No previous message that references this message.\"",
"return",
"endif",
"set __msgidlist=",
"foreach i ($[%?references?]) 'set __msgidlist += $i\"\\|\"'",
"set __msgidlist += NONEXISTENT",
"search -1 -r ^-. -h message-id \"$__msgidlist\"",
"if \"x$output\" == x",
"error \"No previous message that references this message.\"",
"else",
"msg_list - $output | display",
"endif",
"}",
"function zmenu_all_ref_msgid () {",
"msg_list . | set __msgno",
"set __mid=\"$[%i]\"",
"if \"x$__mid\" == \"x\"",
"error \"Message $__msgno has no Message-Id.\"",
"unset __msgno __mid",
"return",
"endif",
"unset __msgno __mid",
"search -n -h references,in-reply-to -e \"$[%i]\"",
"msg_list . $output",
"}",
"function zmenu_all_ref_mark () {",
"msg_list `:m`",
"}",
"function zmenu_next_ref_mark () {",
"msg_list .-$ {.} | :m",
"if \"x$output\" == x",
"error \"No next message that is marked.\"",
"else",
"search +1 -r $output | display",
"endif",
"}",
"function zmenu_prev_ref_mark () {",
"msg_list ^-. {.} | :m",
"if \"x$output\" == x",
"error \"No previous message that is marked.\"",
"else",
"search -1 -r $output | display",
"endif",
"}",
"function zmenu_next_ref_priority () {",
"if \"x$[%?priority?]\" == \"x\"",
"msg_list . | set __msgno",
"error \"Message $__msgno has no priority.\"",
"unset __msgno",
"return",
"endif",
"set __pri=\"$[%?priority?]\"",
"search -r .-$ {.} -p $__pri +1",
"if \"x$output\" == x",
"error \"No next message with priority $__pri.\"",
"else",
"display $output",
"endif",
"}",
"function zmenu_prev_ref_priority () {",
"if \"x$[%?priority?]\" == \"x\"",
"msg_list . | set __msgno",
"error \"Message $__msgno has no priority.\"",
"unset __msgno",
"return",
"endif",
"set __pri=\"$[%?priority?]\"",
"search -r ^-. {.} -p $__pri -1",
"if \"x$output\" == x",
"error \"No previous message with priority $__pri.\"",
"else",
"display $output",
"endif",
"}",
"function zmenu_all_ref_priority () {",
"if \"x$[%?priority?]\" == \"x\"",
"msg_list . | set __msgno",
"error \"Message $__msgno has no priority.\"",
"unset __msgno",
"return",
"endif",
"search -p $[%?priority?]",
"}",
"function zmenu_msg_pri_other () {",
"ask -input __pri \"Message priority to use (A-E or predefined word):\"",
"if $status == 0",
"mark -\"$__pri\"",
"endif",
"}",
"function zmenu_comp_pri_other () {",
"ask -input __pri \"Message priority to use (A-E or predefined word):\"",
"if $status == 0",
"set compose_state += pri_\"$__pri\"",
"endif",
"}",
"function zmenu_charset () {",
"ask -input __cs \"Character Set Name:\"",
"if $status == 0 ",
"if \"x$__cs\" == \"x\"",
"error -p \"No character set entered.\"",
"else",
"compcmd charset \"$__cs\"",
"endif",
"endif",
"}",
"function zmenu_comp_body_textedit () {",
"textedit set-item compose-body",
"textedit $*",
"}",
"function zmenu_comp_body_textcopy () {",
"textedit set-item compose-body",
"textedit get-selection-position __start __end",
"if $__start == $__end",
"if ! $?compose_state:(edit_headers)",
"error -p \"No text is selected.\"",
"else",
"zmenu_comp_header_textcopy $*",
"endif",
"else",
"textedit $*",
"endif",
"}",
"function zmenu_comp_body_paste () {",
"textedit set-item compose-body",
"textedit paste-replace",
"}",
"function zmenu_comp_header_textcopy () {",
"textedit set-item compose-header",
"textedit get-selection-position __start __end",
"if $__start == $__end",
"error -p \"No text is selected.\"",
"else",
"textedit $*",
"endif",
"}",
"function zmenu_msg_body_textedit () {",
"textedit set-item message-body",
"textedit $*",
"}",
"function zmenu_msg_body_textcopy () {",
"textedit set-item message-body",
"textedit get-selection-position __start __end",
"if $__start == $__end",
"zmenu_msg_header_textcopy $*",
"else",
"textedit $*",
"endif",
"}",
"function zmenu_msg_header_textcopy () {",
"textedit set-item message-header",
"textedit get-selection-position __start __end",
"if $__start == $__end",
"error -p \"No text is selected.\"",
"else",
"textedit $*",
"endif",
"}",
"set __pipe_cmd=''",
"function zmenu_comp_pipe () {",
"textedit set-item compose-body",
"textedit get-selection-position __start __end",
"if \"x$__pipe_cmd\" != \"x\"",
"ask -i __pipe_cmd -d \"$__pipe_cmd\" \"Pipe to shell command:\"",
"else",
"ask -i __pipe_cmd \"Pipe to shell command:\"",
"endif",
"if $status == 0",
"textedit set-item compose-body",
"textedit set-selection-position $__start $__end",
"textedit pipe \"$__pipe_cmd\"",
"endif",
"}",
"function zmenu_comp_indent () {",
"set __pfx=''",
"textedit set-item compose-body",
"textedit get-selection-position __indentstart __indentend",
"if $?indent_str != 0",
"if \"$indent_str\" =~ \"*%*\"",
"eval -h set __pfx=\"'$indent_str'\"",
"else",
"set __pfx=\"$indent_str\"",
"endif",
"endif",
"if \"x$__pfx\" == \"x\"",
"ask -i __pfx \"Indent with:\"",
"else",
"ask -i __pfx -d \"$__pfx\" \"Indent with:\"",
"endif",
"if $status == 0",
"textedit set-selection-position $__indentstart $__indentend",
"textedit indent \"$__pfx\"",
"unset __pfx",
"endif",
"}",
"function zmenu_comp_cancel () {",
"if $?compose_state:(active) == 0",
"dialog -close",
"else",
"compcmd cancel",
"endif",
"}",
"function zmenu_comp_done () {",
"if $?compose_state:(active) == 0",
"dialog -close",
"return",
"endif",
"ask -m -d \"Send Letter\" -i __action \"Please select an action:\" \"Continue Editing\" \"Discard Letter\" \"Send Letter\"",
"if $status == 0",
"if \"x$__action\" == \"x\"\"Send Letter\"",
"compcmd send",
"endif",
"if \"x$__action\" == \"x\"\"Discard Letter\"",
"compcmd quit",
"endif",
"if $?autodismiss",
"if $?autodismiss:(compose)",
"return 0",
"endif",
"if X\"$autodismiss\" == X",
"return 0",
"endif",
"endif",
"if $?compose_state:(active) == 0",
"dialog -close",
"endif",
"endif",
"}",
"function zmenu_set_tmpdir() {",
"unset __tmpdir",
"if $?tmpdir",
"if \"x$tmpdir\" != x",
"set __tmpdir = \"$tmpdir\"",
"return",
"endif",
"endif",
"set __tmpdir = /tmp",
"}",
"function zmenu_comp_print () {",
"zmenu_set_tmpdir",
"compcmd write-to-file $__tmpdir/zmsg$$		# Write body",
"if $status != 0",
"return",
"endif",
"lpr $__tmpdir/zmsg$$",
"remove -f $__tmpdir/zmsg$$",
"}",
"function zmenu_toolbar_include() {",
"if !$compose_state:(active)",
"error \"No active composition in this window.\"",
"return",
"endif",
"ask -m -i __userChoice \"Include:\" \"Message\" \"File\"",
"if $status != 0",
"return -1",
"endif ",
"if \"$__userChoice\" == \"File\"",
"ask -f __userChoice2 \"Include what file?\"",
"if $status != 0",
"return -1",
"endif",
"compcmd insert-file \"$__userChoice2\"",
"else",
"compcmd include-message",
"endif",
"}",
"function zmenu_toolbar_send() {",
"if $?compose_state:(active)",
"compcmd send",
"else",
"error \"No active composition in this window.\"",
"endif",
"}",
"function zbutton_read () {",
"msg_list | set __msg_list",
"if \"x$__msg_list\" !~ \"x*[-,]*\"",
"type",
"else",
"error \"To list a group of messages to be viewed in$(\\n)sequence, select the menu item \"'\"View Selected Only\"'\"$(\\n)in the View menu.  Select the menu item \"'\"View All\"'\" to$(\\n)return the message list to normal.\"",
"endif",
"}",
"function zbutton_reuse () {",
"zmenu_set_tmpdir",
"textedit set-item compose-body",
"textedit save-to-file $__tmpdir/zmsg$$",
"if $status != 0",
"return",
"endif",
"textedit set-item subject-header-field",
"textedit get-text __subj",
"if $status == 0",
"if \"x$__subj\" == \"x\"",
"mail -edit_hdrs! -file $__tmpdir/zmsg$$",
"else",
"mail -edit_hdrs! -subject \"$__subj\" -file $__tmpdir/zmsg$$",
"endif",
"else",
"mail -edit_hdrs -draft $__tmpdir/zmsg$$",
"endif   ",
"remove -f $__tmpdir/zmsg$$",
"}",
"function zmenu_edit_signature () {",
"set __sigstrname = ~/.sigstring",
"set __sigfilename = ~/.signature",
"if $?autosign",
"if \"X$autosign\" =~ 'X\\\\*'",
"sh echo \"$autosign\" > $__sigstrname",
"set autosign = $__sigstrname",
"else",
"if \"X$autosign\" =~ 'X\\[*\\]'",
"sh echo \"$autosign\" > $__sigstrname",
"set autosign = $__sigstrname",
"endif",
"endif",
"endif",
"if ! $?autosign",
"set autosign = $__sigfilename",
"endif",
"if X\"$autosign\" == X",
"set __sigfile = $__sigfilename",
"else",
"set __sigfile = \"$autosign\"",
"endif",
"if ! -e $__sigfile",
"if $?realname",
"sh echo \"$realname\" > \"$__sigfile\"",
"else",
"sh echo > \"$__sigfile\"",
"endif",
"endif",
"page -e \"$__sigfile\"",
"unset __sigfile __sigstrname __sigfilename",
"}",
"function zmenu_view_only_selected () {",
"msg_list | set __mlist",
"flags +H *{$__mlist}",
"unset __mlist",
"msg_list .",
"}",
"function zmenu_unhide_all () {",
"if $?selected",
"set __sel = \"$selected\"",
"else",
"set __sel = .",
"endif",
"flags -H *",
"unset hidden",
"msg_list $__sel",
"}",
"function zmenu_paste_indented () {",
"set __pfx=''",
"if $?indent_str != 0",
"if \"$indent_str\" =~ \"*%*\"",
"eval -h set __pfx=\"'$indent_str'\"",
"else",
"set __pfx=\"$indent_str\"",
"endif",
"endif",
"if \"x$__pfx\" == \"x\"",
"ask -i __pfx \"Indent with:\"",
"else",
"ask -i __pfx -d \"$__pfx\" \"Indent with:\"",
"endif",
"if $status == 0",
"textedit set-item compose-body",
"textedit get-cursor-position __indentstart",
"textedit paste",
"textedit get-cursor-position __indentend",
"if x$__indentstart == x$__indentend",
"error -p \"The clipboard is empty.\\nCut or copy text before pasting.\"",
"else",
"textedit set-selection-position $__indentstart $__indentend",
"textedit indent \"$__pfx\"",
"endif",
"endif",
"unset __pfx",
"}",
"function zmenu_paste_fill () {",
"textedit set-item compose-body",
"textedit get-cursor-position __indentstart",
"textedit paste",
"textedit get-cursor-position __indentend",
"if x$__indentstart == x$__indentend",
"error -p \"The clipboard is empty.\\nCut or copy text before pasting.\"",
"else",
"textedit set-selection-position $__indentstart $__indentend",
"textedit fill",
"endif",
"}",
"function zmenu_remove_folder () {",
"ask -f __file -d +/ \"Select the mail folder you want to remove from the list below.$(\\n)Then click on [Remove].\"",
"if $status == 0",
"rmfolder \"$__file\"",
"unset __file",
"endif",
"}",
"function zmenu_merge_folder () {",
"ask -f __file -d +/ \"Folder to merge:\"",
"if $status == 0",
"merge \"$__file\"",
"unset __file",
"endif",
"}",
"function zmenu_sort_by () {",
"sort $*",
"if $?main_state:(folder_has_messages)",
"redraw .",
"endif",
"}",
"function zmenu_full_headers () {",
"if ! $?display_headers",
"set display_headers = unignored",
"endif",
"display",
"}",
"function zmenu_init_drafts() {",
"if $?__drafts_file",
"return 0",
"endif",
"if $?dead",
"if \"$dead\" !~ \"|*\"",
"set __draft_file = \"$dead\"",
"else",
"set __draft_file = ~/dead.letter",
"endif",
"else",
"set __draft_file = ~/dead.letter",
"endif",
"}",
"function zmenu_open_drafts() {",
"zmenu_init_drafts",
"set __draft_question = \"Select draft folder:\"",
"if \"x$__draft_file\" != x",
"ask -f __draft_file -d \"$__draft_file\" \"$__draft_question\"",
"else",
"ask -f __draft_file \"$__draft_question\"",
"endif",
"if $status == 0",
"open $__draft_file",
"endif",
"}",
"function zmenu_follow_url() {",
"textedit set-item $1",
"unset __url",
"textedit get-selection __url",
"if $?__url",
"follow_url \"$__url\"",
"else",
"error \"No URL is selected.\"",
"endif",
"return $status",
"}",
"button -W main -b MainActions",
"button -W compose -b ComposeActions",
"button -W message -b MessageActions",
"menu -W main -b MainMenu",
"menu -W compose -b ComposeMenu",
"menu -W message -b MessageMenu",
"menu -popup main-summaries -b MainSummariesPopupMenu",
"menu -popup compose-body -b ComposeBodyPopupMenu",
"button -W main",
"button -label 'Read' -name Read zbutton_read",
"button -label 'Delete' -name Delete delete",
"button -label 'Undelete' -name Undelete undelete",
"button -label 'Save' -name Save dialog Save",
"button -label 'Print' -name Print 'lpr'",
"button -label 'Compose' -n -name Compose mail",
"button -label 'Reply' -name Reply replysender",
"button -label 'Forward' -name Forward 'mail -f'",
"button -label 'Update' -n -name Update update",
"button -W compose",
"button -label 'Send' -name Send -sensitivity '$?compose_state:(active)' 'compcmd send'",
"button -label 'Include' -name Include -sensitivity '$?compose_state:(active) && $?main_state:(folder_has_messages) && !$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' 'compcmd include-message'",
"button -label 'Attachments' -name Attachments -sensitivity '$?compose_state:(active) && !$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' dialog Attachments",
"button -label 'Cancel' -name Cancel zmenu_comp_cancel",
"button -W message",
"button -label 'Next' -sensitivity '$?message_state:(is_next)' -name Next next",
"button -label 'Prev' -sensitivity '$?message_state:(is_prev)' -name Prev previous",
"button -label 'Delete' -name Delete delete",
"button -label 'Save' -name Save dialog Save",
"button -label 'Reply' -name Reply reply",
"button -label 'ReplyAll' -name ReplyAll replyall",
"button -label 'Close' -name Close dialog -close",
"button -B ToolboxItems",
"button -label 'Aliases' -name Aliases -icon alias_icon dialog Aliases",
"button -label 'Browser' -name Browser -icon addrbook_icon dialog Browser",
"button -label 'Compose' -name Compose -icon compose_icon mail",
"button -label 'Envelope' -name Envelope -icon envelope_icon dialog Envelope",
"button -label 'Headers' -name Headers -icon headers_icon dialog Headers",
"button -label 'Templates' -name Templates -icon templates_icon dialog Templates",
"button -label 'Dates' -name Dates -icon dates_icon dialog Dates",
"button -label 'Search' -name Search -icon search_icon dialog Search",
"button -label 'Sort' -name Sort -icon sort_icon dialog Sort",
"button -label 'Variables' -name Variables -icon variables_icon dialog Variables",
"button -label 'Printer' -name Printer -icon printer_icon dialog Printer",
"button -label 'Help' -name Help -icon help_icon dialog Help",
"button -label 'Buttons' -name Buttons -icon buttons_icon dialog Buttons",
"button -label 'Menus' -name Menus -icon menus_icon dialog menus",
"button -label 'Colors' -name Colors -icon paint_icon dialog Colors",
"button -label 'Filters' -name Filters -icon filters_icon dialog Filters",
"button -label 'Fonts' -name Fonts -icon fonts_icon dialog Fonts",
"button -label 'Functions' -name Functions -icon functions_icon dialog Functions",
"button -W main",
"menu -W main",
"menu -name folder -menu MainFolderMenu ",
"menu -name message -menu MainMessageMenu ",
"menu -name view -menu MainViewMenu ",
"menu -name find -menu MainFindMenu ",
"menu -name sort -menu MainSortMenu ",
"menu -name compose -menu MainComposeMenu ",
"menu -name options -menu MainOptionsMenu ",
"menu -name layout -menu MainLayoutMenu ",
"menu -name help -menu MainHelpMenu -help-menu ",
"menu -B MainFolderMenu",
"menu -n -name mfm_new_folder 'dialog NewFolder'",
"menu -n -name mfm_open_folder dialog AddFolder",
"menu -n -name mfm_rename_folder dialog RenameFolder",
"menu -n -name mfm_remove_folder zmenu_remove_folder",
"menu -n -name mfm_update update",
"menu -n -name mfm_close_fldr close",
"menu -separator -name fmsep",
"menu -n -name mfm_quit quit",
"menu -B MainMessageMenu",
"menu -name mm_read 'display'",
"menu -name mm_save dialog Save",
"menu -name mm_delete delete",
"menu -name mm_undelete undelete",
"menu -name mm_print 'dialog Printer'",
"menu -name mm_pinup 'pinup'",
"menu -separator -name __sep0",
"menu -name mm_priority -menu PriorityMenu ",
"menu -name mm_mark mark",
"menu -name mm_unmark unmark",
"menu -name mm_preserve preserve",
"menu -name mm_unpreserve unpreserve",
"menu -separator -name _sep1",
"menu -n -name mm_select_all 'msg_list *'",
"menu -B PriorityMenu",
"menu -name emp_low 'mark -Low'",
"menu -name emp_urgent 'mark -Medium'",
"menu -name emp_high 'mark -High'",
"menu -name emp_none 'mark -'",
"menu -name _sep1 -separator",
"menu -name emp_other zmenu_msg_pri_other",
"menu -B MainViewMenu",
"menu -name vm_view_all -n zmenu_unhide_all",
"menu -name vm_view_sel_only -n zmenu_view_only_selected",
"menu -name vm_hide_sel hide",
"menu -separator -name _sep0",
"menu -name vm_hide_old -n -value '$?hidden:(old)' ",
"menu -name vm_hide_del -n -value '$?hidden:(deleted)' ",
"menu -B MainFindMenu",
"menu -name mfim_all_references -menu FindAllRefMenu ",
"menu -name mfim_next_reference -menu FindNextRefMenu ",
"menu -name mfim_prev_reference -menu FindPrevRefMenu ",
"menu -separator -name _sep1",
"menu -n -name mfim_pattern dialog Search",
"menu -n -name mfim_date dialog Dates",
"menu -B FindNextRefMenu",
"menu -name nrm_same_subject zmenu_next_ref_subj",
"menu -name nrm_same_author zmenu_next_ref_auth",
"menu -name nrm_same_msgid zmenu_next_ref_msgid",
"menu -name nrm_same_priority zmenu_next_ref_priority",
"menu -name nrm_same_mark zmenu_next_ref_mark",
"menu -B FindPrevRefMenu",
"menu -name prm_same_subject zmenu_prev_ref_subj",
"menu -name prm_same_author zmenu_prev_ref_auth",
"menu -name prm_same_msgid zmenu_prev_ref_msgid",
"menu -name prm_same_priority zmenu_prev_ref_priority",
"menu -name prm_same_mark zmenu_prev_ref_mark",
"menu -B FindAllRefMenu",
"menu -name arm_same_subject zmenu_all_ref_subj",
"menu -name arm_same_author zmenu_all_ref_auth",
"menu -name arm_same_msgid zmenu_all_ref_msgid",
"menu -name arm_same_priority zmenu_all_ref_priority",
"menu -name arm_same_mark zmenu_all_ref_mark",
"menu -B MainSortMenu",
"menu -n -name sm_date 'zmenu_sort_by d'",
"menu -n -name sm_subject 'zmenu_sort_by s'",
"menu -n -name sm_author 'zmenu_sort_by a'",
"menu -n -name sm_length 'zmenu_sort_by l'",
"menu -n -name sm_priority 'zmenu_sort_by p'",
"menu -n -name sm_status 'zmenu_sort_by S'",
"menu -separator -name _sep1",
"menu -n -name sm_custom 'dialog Sort'",
"menu -B MainComposeMenu",
"menu -n -name mcm_compose mail",
"menu -n -name mcm_compose_tagit zm_compose_tag_it",
"menu -n -name mcm_compose_phonetag zm_compose_phone_tag",
"menu -name mcm_drafts -menu DraftsMenu ",
"menu -separator -name _sep0",
"menu -name mcm_reply -sensitivity '$?main_state:(folder_has_messages)' -menu ReplyMenu ",
"menu -name mcm_forward -menu ForwardMenu ",
"menu -separator -name _sep1",
"menu -n -name mcm_browser -sensitivity '$?address_book' 'dialog Browser'",
"menu -n -name mcm_templates 'dialog Templates'",
"menu -B ReplyMenu",
"menu -name rpm_replysender replysender",
"menu -name rpm_replyall replyall",
"menu -separator -name _sep0",
"menu -name rpm_sender_inc 'replysender -i'",
"menu -name rpm_all_inc 'replyall -i'",
"menu -B ForwardMenu",
"menu -name fwdm_resend 'mail -send -forward'",
"menu -name fwdm_forward 'mail -f'",
"menu -name fwdm_forward_attach 'mail -M'",
"menu -B DraftsMenu",
"menu -n -name dm_drafts zmenu_open_drafts",
"menu -name dm_send_draft -sensitivity '$?main_state:(folder_has_messages)' \"mail -q\"",
"menu -name dm_resume_draft -sensitivity '$?main_state:(folder_has_messages)' \"mail -q!\"",
"menu -B MainOptionsMenu",
"menu -n -name mom_aliases 'dialog Aliases'",
"menu -n -name mom_sig zmenu_edit_signature",
"menu -n -name mom_headers 'dialog Headers'",
"menu -n -name mom_envelope 'dialog Envelope'",
"menu -separator -name _sep0",
"menu -n -name mom_buttons 'dialog Buttons'",
"menu -n -name mom_menus 'dialog Menus'",
"menu -n -name mom_colors 'dialog Colors'",
"menu -n -name mom_filters 'dialog Filters'",
"menu -n -name mom_fonts 'dialog Fonts'",
"menu -n -name mom_functions 'dialog Functions'",
"menu -n -name mom_toolbox 'dialog Toolbox'",
"menu -separator -name _sep1",
"menu -n -name mom_variables 'dialog Variables'",
"menu -n -name mom_setup -menu SetupMenu ",
"menu -n -name mom_save_state 'saveopts -g'",
"menu -B SetupMenu",
"menu -n -name setup_ldap 'dialog Variables -C 6 '",
"menu -n -name setup_pop 'dialog Variables -C 7 '",
"menu -n -name setup_imap 'dialog Variables -C 8 '",
"menu -n -name setup_user 'dialog Variables -C 9 '",
"menu -B MainLayoutMenu",
"menu -n -name win_toolbar -value '$?main_panes:(toolbar)' zmenu_load_main_toolbar",
"menu -n -name win_title -value '$?main_panes:(status)' ",
"menu -n -name win_control -value '$?main_panes:(folder)' ",
"menu -n -name win_list -value '$?main_panes:(messages)' ",
"menu -n -name win_panel -value '$?main_panes:(buttons)' ",
"menu -n -name win_output -value '$?main_panes:(output)' ",
"menu -n -name win_command -value '$?main_panes:(command)' ",
"menu -n -name win_status -value '$?main_panes:(status_bar)' ",
"menu -B MainHelpMenu",
"menu -n -name mhm_context help -c",
"menu -n -name mhm_general help -i General",
"menu -separator -name _sep0",
"menu -n -name mhm_menus help -i \"Main Window\"",
"menu -n -name mhm_compose help -i \"Compose Window\"",
"menu -n -name mhm_read help -i 'Reading Messages'",
"menu -n -name mhm_print help -i 'Printing Messages'",
"menu -n -name mhm_reply help -i 'Replying to a Message'",
"menu -n -name mhm_saving help -i 'Saving Messages'",
"menu -n -name mhm_updating help -i Updating",
"menu -n -name mhm_opening help -i 'Opening Folders'",
"menu -n -name mhm_indexing help -i 'Folder Popup'",
"menu -separator -name _sep1",
"menu -n -name mhm_functions dialog functionsHelp",
"menu -n -name mhm_index help -t -i 'Main Window'",
"menu -separator -name _sep2",
"menu -n -name mhm_product help -i 'About This Program'",
"menu -W compose",
"menu -name message -menu ComposeMessageMenu ",
"menu -name edit -sensitivity '$?compose_state:(active)' -menu ComposeEditMenu ",
"menu -name include -sensitivity '$?compose_state:(active)' -menu ComposeIncludeMenu ",
"menu -name address -sensitivity '$?compose_state:(active)' -menu ComposeAddressesMenu ",
"menu -name options -sensitivity '$?compose_state:(active)' -menu ComposeOptionsMenu ",
"menu -name layout -menu ComposeLayoutMenu ",
"menu -name help -menu ComposeHelpMenu -help-menu ",
"menu -B ComposeMessageMenu",
"menu -n -name mm_compose mail",
"menu -name mm_reuse -sensitivity '!$?compose_state:(active)' zbutton_reuse",
"menu -n -name mm_templates -sensitivity '!$?compose_state:(active)' 'dialog Templates'",
"menu -separator -name _sep0",
"menu -n -name mm_send -sensitivity '$?compose_state:(active)' compcmd send",
"menu -n -name mm_save -sensitivity '$?compose_state:(active)' zmenu_save_to_file",
"menu -n -name mm_draft -sensitivity '$?compose_state:(active)' zmenu_save_draft",
"menu -n -name mm_print -sensitivity '$?compose_state:(active)' zmenu_comp_print",
"menu -separator -name _sep1",
"menu -name mmm_attachments -sensitivity '$?compose_state:(active) && !$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' dialog Attachments",
"menu -separator -name _sep2",
"menu -n -name com_charset -menu ComposeCharsetMenu",
"menu -n -name mm_cancel zmenu_comp_cancel",
"menu -B ComposeCharsetMenu",
"menu -n -name com_cs_sender zmenu_match_sender_charset",
"menu -n -name com_ascii compcmd charset us-ascii",
"menu -n -name com_iso_8859_1 compcmd charset iso-8859-1",
"menu -n -name com_iso_8859_2 compcmd charset iso-8859-2",
"menu -n -name com_x_macintosh compcmd charset x-macintosh ",
"menu -n -name com_x_iso_646_se1 compcmd charset x-iso-646-se1 ",
"menu -n -name com_cs_other zmenu_charset",
"menu -B ComposeEditMenu",
"menu -n -name em_cut zmenu_comp_body_textcopy cut-selection",
"menu -n -name em_copy zmenu_comp_body_textcopy copy-selection",
"menu -n -name em_paste zmenu_comp_body_paste",
"menu -name em_paste_sp -menu ComposePasteSpecialMenu ",
"menu -n -name em_delete zmenu_comp_body_textcopy clear-selection",
"menu -name em_format -menu ComposeEditFormatMenu ",
"menu -separator -name _sep0",
"menu -n -name em_select_all zmenu_comp_body_textedit select-all",
"menu -separator -name _sep1",
"menu -n -name em_search dialog SearchReplace",
"menu -separator -name _sep2",
"menu -n -name em_editor compcmd edit",
"menu -B ComposePasteSpecialMenu",
"menu -n -name psm_indent zmenu_paste_indented",
"menu -n -name psm_fill zmenu_paste_fill",
"menu -B ComposeEditFormatMenu",
"menu -n -name em_fill zmenu_comp_body_textedit fill",
"menu -n -name em_indent zmenu_comp_indent",
"menu -n -name em_unindent zmenu_comp_body_textedit unindent",
"menu -n -name em_process zmenu_comp_pipe",
"menu -B ComposeOptionsMenu",
"menu -n -name com_directory -value '$?compose_state:(directory_check)' -sensitivity '$?address_book || $?compose_state:(directory_check)' ",
"menu -n -name com_autosign -value '$?compose_state:(autosign)' ",
"menu -n -name com_autoformat -value '$?compose_state:(autoformat)' ",
"menu -n -name com_edit-headers -value '$?compose_state:(edit_headers)' -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' ",
"menu -name hdrs_priority -menu ComposePriorityMenu ",
"menu -n -name com_sendcheck -value '$?compose_state:(sendtime_check)' -sensitivity '$?address_book' ",
"menu -n -name com_return-receipt -value '$?compose_state:(return_receipt)' ",
"menu -n -name com_record-msg -value '$?compose_state:(record_msg)' ",
"menu -n -name com_phone-tag -value '$?compose_state:(phone_tag)' -sensitivity '!$?compose_state:(tag_it)' ",
"menu -n -name com_tag-it -value '$?compose_state:(tag_it)' -sensitivity '!$?compose_state:(phone_tag)' ",
"menu -n -name com_read-receipt -value '$?compose_state:(read_receipt)' ",
"menu -separator -name _sep0",
"menu -name com_options -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' dialog CompOptions",
"menu -B ComposeIncludeMenu",
"menu -name im_messages -sensitivity '$?main_state:(folder_has_messages) && !$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' -menu ComposeIncludeMessageMenu",
"menu -name im_files -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' -menu ComposeIncludeFileMenu",
"menu -B ComposeIncludeMessageMenu",
"menu -name imm_selected compcmd include-message",
"menu -name imm_forward compcmd forward-unindented",
"menu -name imm_forward_attach compcmd forward-attached",
"menu -B ComposeIncludeFileMenu",
"menu -n -name ifm_indented -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' zmenu_insert_file insert",
"menu -n -name ifm_indentedr -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' zmenu_insert_file replace",
"menu -B ComposeAddressesMenu",
"menu -n -name hdrs_aliases dialog CompAliases",
"menu -n -name hdrs_browse -sensitivity '$?address_book' dialog Browser",
"menu -n -name hdrs_check -sensitivity '$?address_book' compcmd address-check",
"menu -n -name hdrs_dynamic -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' dialog DynamicHdrs",
"menu -separator -name _sep0",
"menu -n -name hdrs_to -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' compcmd to",
"menu -n -name hdrs_subject -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' compcmd subject",
"menu -n -name hdrs_cc -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' compcmd cc",
"menu -n -name hdrs_bcc -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' compcmd bcc",
"menu -B ComposePriorityMenu",
"menu -n -name emp_low -value '$?compose_state:(pri_Low)' ",
"menu -n -name emp_urgent -value '$?compose_state:(pri_Medium)' ",
"menu -n -name emp_high -value '$?compose_state:(pri_High)' ",
"menu -n -name emp_none -value '$?compose_state:(pri_none)' ",
"menu -n -name _sep1 -separator",
"menu -n -name emp_other zmenu_comp_pri_other",
"menu -B ComposeLayoutMenu",
"menu -name lm_toolbar -n -value '$?compose_panes:(toolbar)' -sensitivity '($?compose_state:(active) || $?compose_panes:(toolbar)) && !$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' zmenu_load_compose_toolbar",
"menu -name lm_folder -n -value '$?compose_panes:(folder)' -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' ",
"menu -name lm_hdrs -n -value '!$?compose_state:(edit_headers)' -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' ",
"menu -name lm_attachments -n -value '$?compose_panes:(attachments)' -sensitivity '$?compose_state:(attachments) && !$?compose_state:(phone_tag) && !$?compose_state:(tag_it)'",
"menu -name lm_body -n -value '$?compose_panes:(body)' -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' ",
"menu -name lm_actions -n -value '$?compose_panes:(action_area)' -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' ",
"menu -name lm_status -n -value '$?compose_panes:(status_bar)' -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' ",
"menu -B ComposeHelpMenu",
"menu -name chm_context help -c",
"menu -separator -name _sep0",
"menu -n -name chm_about help -i 'Compose Window'",
"menu -n -name chm_addressing help -i 'Addressing'",
"menu -n -name chm_alias help -i 'Using Aliases'",
"menu -n -name chm_add_attach help -i 'Sending Attachments'",
"menu -n -name chm_include help -i 'Including'",
"menu -n -name chm_send help -i 'Sending a message'",
"menu -n -name chm_options help -i 'Compose Options'",
"menu -separator -name _sep1",
"menu -n -name chm_index help -t -i 'Compose Window'",
"menu -W message",
"menu -name message -menu MessageMessageMenu ",
"menu -name edit -menu MessageEditMenu ",
"menu -name find -menu MessageFindMenu ",
"menu -name compose -menu MessageComposeMenu ",
"menu -name reply -menu ReplyMenu ",
"menu -name forward -menu ForwardMenu ",
"menu -name layout -menu MessageLayoutMenu ",
"menu -name help -menu MessageHelpMenu -help-menu ",
"menu -B MessageComposeMenu",
"menu -n -name cm_compose mail",
"menu -n -name cm_templates 'dialog Templates'",
"menu -B MessageMessageMenu",
"menu -name mmm_save_message dialog Save",
"menu -name mmm_delete delete",
"menu -name mmm_undelete undelete",
"menu -name mmm_print 'dialog Printer'",
"menu -name mmm_pinup 'pinup'",
"menu -separator -name _sep0",
"menu -name mmm_priority -menu PriorityMenu ",
"menu -name mmm_mark mark",
"menu -name mmm_unmark unmark",
"menu -name mmm_preserve preserve",
"menu -name mmm_unpreserve unpreserve",
"menu -separator -name _sep1",
"menu -n -name mmm_charset -menu MessageCharsetMenu",
"menu -name mmm_attachments -sensitivity '$?message_state:(attachments) && !$?message_state:(phone_tag) && !$?message_state:(tag_it)' dialog Attachments",
"menu -separator -name _sep2",
"menu -n -name mmm_done dialog -close",
"menu -B MessageCharsetMenu",
"menu -n -name mmm_ascii 'zmenu_override_in_charset \"us-ascii\"'",
"menu -n -name mmm_iso_8859_1 'zmenu_override_in_charset \"iso-8859-1\"'",
"menu -n -name mmm_iso_8859_2 'zmenu_override_in_charset \"iso-8859-2\"'",
"menu -n -name mmm_iso_8859_5 'zmenu_override_in_charset \"iso-8859-5\"'",
"menu -n -name mmm_x_macintosh 'zmenu_override_in_charset \"x-macintosh\"'",
"menu -n -name mmm_iso_646_gb 'zmenu_override_in_charset \"iso-646-gb\"'",
"menu -n -name mmm_iso_646_no 'zmenu_override_in_charset \"iso-646-no\"'",
"menu -n -name mmm_iso_646_yu 'zmenu_override_in_charset \"iso-646-yu\"'",
"menu -n -name mmm_x_iso_646_se1 'zmenu_override_in_charset \"x-iso-646-se1\"'",
"menu -n -name mmm_x_iso_646_se2 'zmenu_override_in_charset \"x-iso-646-se2\"'",
"menu -n -name mmm_x_ibm_437 'zmenu_override_in_charset \"x-ibm-437\"'",
"menu -n -name mmm_x_ibm_850 'zmenu_override_in_charset \"x-ibm-850\"'",
"menu -B MessageEditMenu",
"menu -n -name em_copy zmenu_msg_body_textcopy copy-selection",
"menu -n -name em_select_all zmenu_msg_body_textedit select-all",
"menu -separator -name _sep1",
"menu -n -name em_edit -sensitivity '!$?message_state:(plain_text) && $?main_state:(folder_writable)' edit",
"menu -separator -name _sep2",
"menu -n -name em_next_page zmenu_msg_body_textedit next-page",
"menu -n -name em_prev_page zmenu_msg_body_textedit previous-page",
"menu -n -name em_scroll_up zmenu_msg_body_textedit scroll-down",
"menu -n -name em_scroll_down zmenu_msg_body_textedit scroll-up",
"menu -n -name em_scroll_home zmenu_msg_body_textedit beginning",
"menu -n -name em_scroll_end zmenu_msg_body_textedit end",
"menu -B MessageFindMenu",
"menu -name fm_next -sensitivity '$?message_state:(is_next)' next",
"menu -name fm_prev -sensitivity '$?message_state:(is_prev)' previous",
"menu -separator -name _sep0",
"menu -name fm_next_reference -menu FindNextRefMenu ",
"menu -name fm_prev_reference -menu FindPrevRefMenu ",
"menu -separator -name _sep1",
"menu -n -name fm_search dialog SearchReplace",
"menu -B MessageHelpMenu",
"menu -name msghm_context help -c",
"menu -separator -name _sep0",
"menu -n -name msghm_about help -i 'Message Display Window'",
"menu -n -name msghm_displaying help -i 'Receiving Attachments'",
"menu -n -name msghm_replying help -i 'Replying to a Message'",
"menu -n -name msghm_print help -i 'Printing Messages'",
"menu -n -name msghm_saving help -i 'Saving Messages'",
"menu -separator -name _sep1",
"menu -n -name msghm_index help -t -i 'Message Display Window'",
"menu -B MessageLayoutMenu",
"menu -name lm_toolbar -n -value '$?message_panes:(toolbar)' zmenu_load_message_toolbar",
"menu -name lm_folder -n -value '$?message_panes:(folder)' ",
"menu -name lm_header -n -value '$?message_panes:(headers)' ",
"menu -name lm_attachments -n -sensitivity '$?message_state:(attachments) && $?message_panes:(headers) && !$?message_state:(phone_tag) && !$?message_state:(tag_it)' -value '$?message_panes:(attachments)' ",
"menu -name lm_body -n -value '$?message_panes:(body)' ",
"menu -name lm_actions -n -value '$?message_panes:(action_area)' ",
"menu -name lm_status -n -value '$?message_panes:(status_bar)' ",
"menu -separator -name _sep0",
"menu -name lm_full_headers -value '$?display_headers:(all)' -sensitivity '!$?message_state:(pinup)' zmenu_full_headers",
"menu -popup-context main-summaries",
"menu -name msp_read 'type'",
"menu -name msp_delete 'delete'",
"menu -name msp_undelete 'undelete'",
"menu -name msp_save dialog Save",
"menu -name msp_hide 'flags +H'",
"menu -name msp_pri -menu PriorityMenu ",
"menu -name msp_lpr 'lpr'",
"menu -name msp_select_all -n 'msg_list *'",
"menu -popup-context read-message-body",
"menu -n -name mpm_copy zmenu_msg_body_textcopy copy-selection",
"menu -n -name mpm_select_all zmenu_msg_body_textedit select-all",
"menu -separator -name _sep0",
"menu -name mpm_save_message dialog Save",
"menu -name mpm_delete delete",
"menu -name mpm_print 'dialog Printer'",
"menu -name mpm_reply -menu ReplyMenu ",
"menu -name mpm_forward -menu ForwardMenu ",
"menu -separator -name _sep1",
"menu -name mbp_browser -sensitivity '$?browser' 'zmenu_follow_url message-body'",
"menu -name mbp_netscape 'set browser = \"$ZMLIB/bin/tell-netscape openURL\"'",
"menu -name mbp_mosaic 'set browser = \"$ZMLIB/bin/tell-mosaic goto\"'",
"menu -popup-context compose-body",
"menu -name cbp_send -sensitivity '$?compose_state:(active)' 'compcmd send'",
"menu -name cbp_include -sensitivity '$?compose_state:(active) && $?main_state:(folder_has_messages)' 'compcmd include-message'",
"menu -name cbp_pri -menu ComposePriorityMenu ",
"menu -name cbp_attach -sensitivity '$?compose_state:(active)' dialog Attachments",
"menu -separator -name _sep0",
"menu -name cbp_cancel zmenu_comp_cancel",
"function zmenu_load_main_toolbar () {",
"if $?main_toolbar_loaded",
"return",
"else",
"if ! $?main_panes:(toolbar)",
"return",
"endif",
"endif",
"set __icons = $ZMLIB/bitmaps/toolbar",
"button -B MainToolbar",
"button -n -name Open -label 'Open' -icon $__icons/open.xbm dialog AddFolder",
"button -name Save -label 'Save' -icon $__icons/save.xbm dialog Save",
"button -name Read -label 'Read' -icon $__icons/read.xbm zbutton_read",
"button -name Delete -label 'Delete' -icon $__icons/delete.xbm delete",
"button -name Undelete -label 'Undelete' -icon $__icons/undelete.xbm undelete",
"button -name Print -label 'Print' -icon $__icons/printer.xbm dialog Printer",
"button -n -name Create -label 'Create New' -icon $__icons/compose.xbm mail",
"button -name Reply -label 'Reply' -icon $__icons/reply.xbm reply",
"button -name ReplyAll -label 'Reply All' -icon $__icons/replyall.xbm replyall",
"button -name Address -label 'Address' -icon $__icons/addrbook.xbm 'dialog Browser'",
"button -name Update -n -label 'Update' -icon $__icons/update.xbm update",
"button -W main",
"set main_toolbar_loaded",
"unset __icons",
"}",
"function zmenu_toolbar_prev () {",
"if $?message_state:(pinup) == 0",
"previous",
"else",
"error \"No previous from Pinup\"",
"endif",
"}",
"function zmenu_toolbar_next () {",
"if $?message_state:(pinup) == 0",
"next",
"else",
"error \"No next from Pinup\"",
"endif",
"}",
"function zmenu_load_message_toolbar () {",
"if $?message_toolbar_loaded",
"return",
"else",
"if ! $?message_panes:(toolbar)",
"return",
"endif",
"endif",
"set __icons = $ZMLIB/bitmaps/toolbar",
"button -B MessageToolbar",
"button -name Close -n -label 'Close' -icon $__icons/close.xbm dialog -close",
"button -name Save -n -label 'Save' -icon $__icons/save.xbm dialog Save",
"button -name Print -n -label 'Print' -icon $__icons/printer.xbm dialog Printer",
"button -name Create -n -label 'Create New' -icon $__icons/compose.xbm mail",
"button -name Reply -n -label 'Reply' -icon $__icons/reply.xbm reply",
"button -n -name All -label 'Reply All' -icon $__icons/replyall.xbm replyall",
"button -name Forward -n -label 'Forward' -icon $__icons/fwd.xbm mail -f",
"button -name Attach -n -label 'Attach' -icon $__icons/attach.xbm dialog Attachments",
"button -name Previous -n -label 'Previous' -icon $__icons/prev.xbm zmenu_toolbar_prev",
"button -name Next -n -label 'Next' -icon $__icons/next.xbm zmenu_toolbar_next",
"button -name Delete -n -label 'Delete' -icon $__icons/delete.xbm delete",
"button -W main",
"set message_toolbar_loaded",
"unset __icons",
"}",
"function zmenu_load_compose_toolbar () {",
"if $?compose_toolbar_loaded",
"return",
"else",
"if ! $?compose_panes:(toolbar)",
"return",
"endif",
"endif",
"set __icons = $ZMLIB/bitmaps/toolbar",
"button -B ComposeToolbar",
"button -name Close -n -label 'Close' -focus-condition '!$?compose_state:(active)' -icon $__icons/close.xbm 'zmenu_comp_done'",
"button -name Cancel -n -label 'Cancel' -icon $__icons/cancel.xbm compcmd cancel",
"button -name Cut -n -label 'Cut' -icon $__icons/cut.xbm zmenu_comp_body_textcopy cut-selection",
"button -name Copy -n -label 'Copy' -icon $__icons/copy.xbm zmenu_comp_body_textcopy copy-selection",
"button -name Paste -n -label 'Paste' -icon $__icons/paste.xbm zmenu_comp_body_textedit paste",
"button -name Search -n -label 'Search' -icon $__icons/search.xbm dialog SearchReplace",
"button -name Aliases -n -label 'Aliases' -icon $__icons/alias.xbm dialog CompAliases",
"button -name Address -n -label 'Address' -icon $__icons/addrbook.xbm dialog Browser",
"button -name Include -n -label 'Include' -icon $__icons/include.xbm zmenu_toolbar_include",
"button -name Attach -n -label 'Attach' -icon $__icons/attach.xbm dialog Attachments",
"button -name Send -n -label 'Send' -icon $__icons/send.xbm zmenu_toolbar_send",
"button -W main",
"set compose_toolbar_loaded",
"unset __icons",
"}",
"zmenu_load_main_toolbar",
"zmenu_load_message_toolbar",
"zmenu_load_compose_toolbar",
"menu -W main",
"button -W main",
"endif",
"else",
"function zm_confirm_read() {",
"set acks = \"$[%?status?]\"",
"set is_unread_mail = 0",
"if \"X$acks\" =~ *!*",
"set is_unread_mail = 1",
"endif",
"if \"X$acks\" =~ *N*",
"set is_unread_mail = 1",
"endif",
"if \"X$acks\" =~ *U*",
"set is_unread_mail = 1",
"endif",
"if $is_unread_mail > 0",
"set read_receipt_requested = 0",
"set acks = \"$[%?X-Chameleon-Return-To?]\"",
"if \"X$acks:1\" !~ \"X\"",
"set read_receipt_requested = 1",
"endif",
"if $read_receipt_requested > 0",
"reply -subject \"Confirm Read: $[%s]\" -send -file $ZMLIB/receipt.zmailrc",
"flags -r",
"endif",
"endif",
"}",
"interpose -operation display zm_confirm_read",
"filter -n pinup_tagit 'pinup' -i -h X-Chameleon-TagIt Tag",
"filter -n pinup_phone_tag 'pinup' -i -h X-Chameleon-PhoneTag Tag",
"ignore X-Chameleon*",
"function zm_compose_tag_it() {",
"mail",
"set compose_state += tag_it",
"}",
"function zm_compose_phone_tag() {",
"mail",
"set compose_state += phone_tag",
"}",
"function zmenu_last_arg() {",
"eval set __l_arg = '$'$#",
"} ",
"function zmenu_match_sender_charset () {",
"compcmd get-header References",
"if $?header_value",
"zmenu_last_arg $header_value",
"pick +1 -h Message-ID $__l_arg",
"if \"x$output\" == \"x\"",
"echo -d \"Couldn't find message $__l_arg\"",
"return",
"endif",
"set __cs = \"\"",
"detach -info param-charset __cs ",
"if \"x$__cs\" == \"x\"",
"compcmd charset \"$incoming_charset\"",
"else",
"compcmd charset \"$__cs\"",
"endif",
"else",
"echo -d \"This composition is not in response to an existing message\"",
"endif",
"}",
"function zmenu_override_in_charset () {",
"set __saved_incoming_charset = \"$incoming_charset\"",
"set incoming_charset = \"$1\"",
"set __override_charset_label = \"$1\"",
"if '?$display_headers:(all)'",
"Print",
"else",
"print",
"endif",
"set incoming_charset = \"$__saved_incoming_charset\"",
"unset __saved_incoming_charset __override_charset_label",
"}",
"function zmenu_insert_file () {",
"ask -f __file \"Double click on a directory in the list below to open it.  Select$(\\n)the file you want to include in your message.  Then click on [Ok].\"",
"if $status == 0",
"if $1 == replace",
"textedit set-item compose-body",
"textedit delete-all",
"endif",
"compcmd insert-file \"$__file\"",
"unset __file",
"endif",
"}",
"set __save_file=''",
"function zmenu_save_to_file () {",
"if \"x$__save_file\" != \"x\"",
"ask -f __save_file -d \"$__save_file\" \"Double click on a directory in the list below to open the one in$(\\n)which you want to write the file. Enter the desired name in the$(\\n)\"'\"'\"File\"'\"'\" field, and click on [Ok].\"",
"else",
"ask -f __save_file \"Double click on a directory in the list below to open the one in$(\\n)which you want to write the file. Enter the desired name in the$(\\n)\"'\"'\"File\"'\"'\" field, and click on [Ok].\"",
"endif",
"if $status == 0",
"compcmd save-to-file \"$__save_file\"",
"if $status == 0",
"echo 'Saved to \"'\"$__save_file\"'\".'",
"endif",
"endif",
"}",
"set __draft_file=''",
"function zmenu_save_draft () {",
"if \"x$__draft_file\" != \"x\"",
"ask -f __draft_file -d \"$__draft_file\" \"Draft file to write:\"",
"else",
"ask -f __draft_file \"Draft file to write:\"",
"endif",
"if $status == 0",
"compcmd save-draft \"$__draft_file\"",
"if $status == 0",
"echo \"Saved draft to \"$__draft_file\".\"",
"endif",
"endif",
"}",
"function zmenu_next_ref_subj () {",
"msg_list . | set __msgno",
"set __subj=\"$[%S]\"",
"if \"x$__subj\" == \"x\"",
"error \"Message $__msgno has no subject.\"",
"unset __msgno __subj",
"return",
"endif",
"search +2 -1 -r .-$ -s -n -e \"$__subj\"$",
"if \"x$output\" == \"x\"",
"error 'No next message about \"'\"$__subj\"'\".'",
"else",
"if \"$output\" == \"$__msgno\"",
"error 'No next message about \"'\"$__subj\"'\".'",
"unset __msgno __subj",
"else",
"msg_list - $output | display",
"endif",
"endif",
"}",
"function zmenu_prev_ref_subj () {",
"msg_list . | set __msgno",
"set __subj=\"$[%S]\"",
"if \"x$__subj\" == \"x\"",
"error \"Message $__msgno has no subject.\"",
"unset __msgno __subj",
"return",
"endif",
"search -2 +1 -r ^-. -s -n -e \"$__subj\"$",
"if \"x$output\" == \"x\"",
"error 'No previous message about \"'\"$__subj\"'\".'",
"else",
"if $output == $__msgno",
"error 'No previous message about \"'\"$__subj\"'\".'",
"else",
"msg_list - $output | display",
"endif",
"endif",
"}",
"function zmenu_all_ref_subj () {",
"msg_list . | set __msgno",
"if \"x$[%S]\" == \"x\"",
"error \"Message $__msgno has no subject.\"",
"unset __msgno",
"return",
"endif",
"unset __msgno",
"search -s -n -e \"$[%S]\"$",
"}",
"function zmenu_next_ref_auth () {",
"msg_list . | set __msgno",
"set __auth=\"$[%a]\"",
"search +2 -1 -r .-$ -n -f \"$__auth\"",
"if $output == $__msgno",
"error 'No next message from \"'\"$__auth\"'\".'",
"else",
"msg_list - $output | display",
"endif",
"}",
"function zmenu_prev_ref_auth () {",
"msg_list . | set __msgno",
"set __auth=\"$[%a]\"",
"search -2 +1 -r ^-. -n -f \"$__auth\"",
"if $output == $__msgno",
"error 'No previous message from \"'\"$__auth\"'\".'",
"else",
"msg_list - $output | display",
"endif",
"}",
"function zmenu_all_ref_auth () {",
"search -n -f \"$[%a]\"",
"}",
"function zmenu_next_ref_msgid () {",
"msg_list . | set __msgno",
"set __mid=\"$[%i]\"",
"if \"x$__mid\" == \"x\"",
"error \"Message $__msgno has no Message-Id.\"",
"unset __msgno __mid",
"return",
"endif",
"search +1 -r .-$ -h references,in-reply-to -n -e \"$__mid\"",
"if \"x$output\" == x",
"error \"No next message that references this message.\"",
"else",
"msg_list - $output | display",
"endif",
"}",
"function zmenu_prev_ref_msgid () {",
"if \"x$[%?references?]\" == x",
"error \"No previous message that references this message.\"",
"return",
"endif",
"set __msgidlist=",
"foreach i ($[%?references?]) 'set __msgidlist += $i\"\\|\"'",
"set __msgidlist += NONEXISTENT",
"search -1 -r ^-. -h message-id \"$__msgidlist\"",
"if \"x$output\" == x",
"error \"No previous message that references this message.\"",
"else",
"msg_list - $output | display",
"endif",
"}",
"function zmenu_all_ref_msgid () {",
"msg_list . | set __msgno",
"set __mid=\"$[%i]\"",
"if \"x$__mid\" == \"x\"",
"error \"Message $__msgno has no Message-Id.\"",
"unset __msgno __mid",
"return",
"endif",
"unset __msgno __mid",
"search -n -h references,in-reply-to -e \"$[%i]\"",
"msg_list . $output",
"}",
"function zmenu_all_ref_mark () {",
"msg_list `:m`",
"}",
"function zmenu_next_ref_mark () {",
"msg_list .-$ {.} | :m",
"if \"x$output\" == x",
"error \"No next message that is marked.\"",
"else",
"search +1 -r $output | display",
"endif",
"}",
"function zmenu_prev_ref_mark () {",
"msg_list ^-. {.} | :m",
"if \"x$output\" == x",
"error \"No previous message that is marked.\"",
"else",
"search -1 -r $output | display",
"endif",
"}",
"function zmenu_next_ref_priority () {",
"if \"x$[%?priority?]\" == \"x\"",
"msg_list . | set __msgno",
"error \"Message $__msgno has no priority.\"",
"unset __msgno",
"return",
"endif",
"set __pri=\"$[%?priority?]\"",
"search -r .-$ {.} -p $__pri +1",
"if \"x$output\" == x",
"error \"No next message with priority $__pri.\"",
"else",
"display $output",
"endif",
"}",
"function zmenu_prev_ref_priority () {",
"if \"x$[%?priority?]\" == \"x\"",
"msg_list . | set __msgno",
"error \"Message $__msgno has no priority.\"",
"unset __msgno",
"return",
"endif",
"set __pri=\"$[%?priority?]\"",
"search -r ^-. {.} -p $__pri -1",
"if \"x$output\" == x",
"error \"No previous message with priority $__pri.\"",
"else",
"display $output",
"endif",
"}",
"function zmenu_all_ref_priority () {",
"if \"x$[%?priority?]\" == \"x\"",
"msg_list . | set __msgno",
"error \"Message $__msgno has no priority.\"",
"unset __msgno",
"return",
"endif",
"search -p $[%?priority?]",
"}",
"function zmenu_msg_pri_other () {",
"ask -input __pri \"Message priority to use (A-E or predefined word):\"",
"if $status == 0",
"mark -\"$__pri\"",
"endif",
"}",
"function zmenu_comp_pri_other () {",
"ask -input __pri \"Message priority to use (A-E or predefined word):\"",
"if $status == 0",
"set compose_state += pri_\"$__pri\"",
"endif",
"}",
"function zmenu_charset () {",
"ask -input __cs \"Character Set Name:\"",
"if $status == 0 ",
"if \"x$__cs\" == \"x\"",
"error -p \"No character set entered.\"",
"else",
"compcmd charset \"$__cs\"",
"endif",
"endif",
"}",
"function zmenu_comp_body_textedit () {",
"textedit set-item compose-body",
"textedit $*",
"}",
"function zmenu_comp_body_textcopy () {",
"textedit set-item compose-body",
"textedit get-selection-position __start __end",
"if $__start == $__end",
"if ! $?compose_state:(edit_headers)",
"error -p \"No text is selected.\"",
"else",
"zmenu_comp_header_textcopy $*",
"endif",
"else",
"textedit $*",
"endif",
"}",
"function zmenu_comp_body_paste () {",
"textedit set-item compose-body",
"textedit paste-replace",
"}",
"function zmenu_comp_header_textcopy () {",
"textedit set-item compose-header",
"textedit get-selection-position __start __end",
"if $__start == $__end",
"error -p \"No text is selected.\"",
"else",
"textedit $*",
"endif",
"}",
"function zmenu_msg_body_textedit () {",
"textedit set-item message-body",
"textedit $*",
"}",
"function zmenu_msg_body_textcopy () {",
"textedit set-item message-body",
"textedit get-selection-position __start __end",
"if $__start == $__end",
"zmenu_msg_header_textcopy $*",
"else",
"textedit $*",
"endif",
"}",
"function zmenu_msg_header_textcopy () {",
"textedit set-item message-header",
"textedit get-selection-position __start __end",
"if $__start == $__end",
"error -p \"No text is selected.\"",
"else",
"textedit $*",
"endif",
"}",
"set __pipe_cmd=''",
"function zmenu_comp_pipe () {",
"textedit set-item compose-body",
"textedit get-selection-position __start __end",
"if \"x$__pipe_cmd\" != \"x\"",
"ask -i __pipe_cmd -d \"$__pipe_cmd\" \"Pipe to shell command:\"",
"else",
"ask -i __pipe_cmd \"Pipe to shell command:\"",
"endif",
"if $status == 0",
"textedit set-item compose-body",
"textedit set-selection-position $__start $__end",
"textedit pipe \"$__pipe_cmd\"",
"endif",
"}",
"function zmenu_comp_indent () {",
"set __pfx=''",
"textedit set-item compose-body",
"textedit get-selection-position __indentstart __indentend",
"if $?indent_str != 0",
"if \"$indent_str\" =~ \"*%*\"",
"eval -h set __pfx=\"'$indent_str'\"",
"else",
"set __pfx=\"$indent_str\"",
"endif",
"endif",
"if \"x$__pfx\" == \"x\"",
"ask -i __pfx \"Indent with:\"",
"else",
"ask -i __pfx -d \"$__pfx\" \"Indent with:\"",
"endif",
"if $status == 0",
"textedit set-selection-position $__indentstart $__indentend",
"textedit indent \"$__pfx\"",
"unset __pfx",
"endif",
"}",
"function zmenu_comp_cancel () {",
"if $?compose_state:(active) == 0",
"dialog -close",
"else",
"compcmd cancel",
"endif",
"}",
"function zmenu_comp_done () {",
"if $?compose_state:(active) == 0",
"dialog -close",
"return",
"endif",
"ask -m -d \"Send Letter\" -i __action \"Please select an action:\" \"Continue Editing\" \"Discard Letter\" \"Send Letter\"",
"if $status == 0",
"if \"x$__action\" == \"x\"\"Send Letter\"",
"compcmd send",
"endif",
"if \"x$__action\" == \"x\"\"Discard Letter\"",
"compcmd quit",
"endif",
"if $?autodismiss",
"if $?autodismiss:(compose)",
"return 0",
"endif",
"if X\"$autodismiss\" == X",
"return 0",
"endif",
"endif",
"if $?compose_state:(active) == 0",
"dialog -close",
"endif",
"endif",
"}",
"function zmenu_set_tmpdir() {",
"unset __tmpdir",
"if $?tmpdir",
"if \"x$tmpdir\" != x",
"set __tmpdir = \"$tmpdir\"",
"return",
"endif",
"endif",
"set __tmpdir = /tmp",
"}",
"function zmenu_comp_print () {",
"zmenu_set_tmpdir",
"compcmd write-to-file $__tmpdir/zmsg$$		# Write body",
"if $status != 0",
"return",
"endif",
"lpr $__tmpdir/zmsg$$",
"remove -f $__tmpdir/zmsg$$",
"}",
"function zmenu_toolbar_include() {",
"if !$compose_state:(active)",
"error \"No active composition in this window.\"",
"return",
"endif",
"ask -m -i __userChoice \"Include:\" \"Message\" \"File\"",
"if $status != 0",
"return -1",
"endif ",
"if \"$__userChoice\" == \"File\"",
"ask -f __userChoice2 \"Include what file?\"",
"if $status != 0",
"return -1",
"endif",
"compcmd insert-file \"$__userChoice2\"",
"else",
"compcmd include-message",
"endif",
"}",
"function zmenu_toolbar_send() {",
"if $?compose_state:(active)",
"compcmd send",
"else",
"error \"No active composition in this window.\"",
"endif",
"}",
"function zbutton_read () {",
"msg_list | set __msg_list",
"if \"x$__msg_list\" !~ \"x*[-,]*\"",
"type",
"else",
"error \"To list a group of messages to be viewed in$(\\n)sequence, select the menu item \"'\"View Selected Only\"'\"$(\\n)in the View menu.  Select the menu item \"'\"View All\"'\" to$(\\n)return the message list to normal.\"",
"endif",
"}",
"function zbutton_reuse () {",
"zmenu_set_tmpdir",
"textedit set-item compose-body",
"textedit save-to-file $__tmpdir/zmsg$$",
"if $status != 0",
"return",
"endif",
"textedit set-item subject-header-field",
"textedit get-text __subj",
"if $status == 0",
"if \"x$__subj\" == \"x\"",
"mail -edit_hdrs! -file $__tmpdir/zmsg$$",
"else",
"mail -edit_hdrs! -subject \"$__subj\" -file $__tmpdir/zmsg$$",
"endif",
"else",
"mail -edit_hdrs -draft $__tmpdir/zmsg$$",
"endif   ",
"remove -f $__tmpdir/zmsg$$",
"}",
"function zmenu_edit_signature () {",
"set __sigstrname = ~/.sigstring",
"set __sigfilename = ~/.signature",
"if $?autosign",
"if \"X$autosign\" =~ 'X\\\\*'",
"sh echo \"$autosign\" > $__sigstrname",
"set autosign = $__sigstrname",
"else",
"if \"X$autosign\" =~ 'X\\[*\\]'",
"sh echo \"$autosign\" > $__sigstrname",
"set autosign = $__sigstrname",
"endif",
"endif",
"endif",
"if ! $?autosign",
"set autosign = $__sigfilename",
"endif",
"if X\"$autosign\" == X",
"set __sigfile = $__sigfilename",
"else",
"set __sigfile = \"$autosign\"",
"endif",
"if ! -e $__sigfile",
"if $?realname",
"sh echo \"$realname\" > \"$__sigfile\"",
"else",
"sh echo > \"$__sigfile\"",
"endif",
"endif",
"page -e \"$__sigfile\"",
"unset __sigfile __sigstrname __sigfilename",
"}",
"function zmenu_view_only_selected () {",
"msg_list | set __mlist",
"flags +H *{$__mlist}",
"unset __mlist",
"msg_list .",
"}",
"function zmenu_unhide_all () {",
"if $?selected",
"set __sel = \"$selected\"",
"else",
"set __sel = .",
"endif",
"flags -H *",
"unset hidden",
"msg_list $__sel",
"}",
"function zmenu_paste_indented () {",
"set __pfx=''",
"if $?indent_str != 0",
"if \"$indent_str\" =~ \"*%*\"",
"eval -h set __pfx=\"'$indent_str'\"",
"else",
"set __pfx=\"$indent_str\"",
"endif",
"endif",
"if \"x$__pfx\" == \"x\"",
"ask -i __pfx \"Indent with:\"",
"else",
"ask -i __pfx -d \"$__pfx\" \"Indent with:\"",
"endif",
"if $status == 0",
"textedit set-item compose-body",
"textedit get-cursor-position __indentstart",
"textedit paste",
"textedit get-cursor-position __indentend",
"if x$__indentstart == x$__indentend",
"error -p \"The clipboard is empty.\\nCut or copy text before pasting.\"",
"else",
"textedit set-selection-position $__indentstart $__indentend",
"textedit indent \"$__pfx\"",
"endif",
"endif",
"unset __pfx",
"}",
"function zmenu_paste_fill () {",
"textedit set-item compose-body",
"textedit get-cursor-position __indentstart",
"textedit paste",
"textedit get-cursor-position __indentend",
"if x$__indentstart == x$__indentend",
"error -p \"The clipboard is empty.\\nCut or copy text before pasting.\"",
"else",
"textedit set-selection-position $__indentstart $__indentend",
"textedit fill",
"endif",
"}",
"function zmenu_remove_folder () {",
"ask -f __file -d +/ \"Select the mail folder you want to remove from the list below.$(\\n)Then click on [Remove].\"",
"if $status == 0",
"rmfolder \"$__file\"",
"unset __file",
"endif",
"}",
"function zmenu_merge_folder () {",
"ask -f __file -d +/ \"Folder to merge:\"",
"if $status == 0",
"merge \"$__file\"",
"unset __file",
"endif",
"}",
"function zmenu_sort_by () {",
"sort $*",
"if $?main_state:(folder_has_messages)",
"redraw .",
"endif",
"}",
"function zmenu_full_headers () {",
"if ! $?display_headers",
"set display_headers = unignored",
"endif",
"display",
"}",
"function zmenu_init_drafts() {",
"if $?__drafts_file",
"return 0",
"endif",
"if $?dead",
"if \"$dead\" !~ \"|*\"",
"set __draft_file = \"$dead\"",
"else",
"set __draft_file = ~/dead.letter",
"endif",
"else",
"set __draft_file = ~/dead.letter",
"endif",
"}",
"function zmenu_open_drafts() {",
"zmenu_init_drafts",
"set __draft_question = \"Select draft folder:\"",
"if \"x$__draft_file\" != x",
"ask -f __draft_file -d \"$__draft_file\" \"$__draft_question\"",
"else",
"ask -f __draft_file \"$__draft_question\"",
"endif",
"if $status == 0",
"open $__draft_file",
"endif",
"}",
"function zmenu_follow_url() {",
"textedit set-item $1",
"unset __url",
"textedit get-selection __url",
"if $?__url",
"follow_url \"$__url\"",
"else",
"error \"No URL is selected.\"",
"endif",
"return $status",
"}",
"button -W main -b MainActions",
"button -W compose -b ComposeActions",
"button -W message -b MessageActions",
"menu -W main -b MainMenu",
"menu -W compose -b ComposeMenu",
"menu -W message -b MessageMenu",
"menu -popup main-summaries -b MainSummariesPopupMenu",
"menu -popup compose-body -b ComposeBodyPopupMenu",
"button -W main",
"button -label 'Read' -name Read zbutton_read",
"button -label 'Delete' -name Delete delete",
"button -label 'Undelete' -name Undelete undelete",
"button -label 'Save' -name Save dialog Save",
"button -label 'Print' -name Print 'lpr'",
"button -label 'Compose' -n -name Compose mail",
"button -label 'Reply' -name Reply replysender",
"button -label 'Forward' -name Forward 'mail -f'",
"button -label 'Update' -n -name Update update",
"button -W compose",
"button -label 'Send' -name Send -sensitivity '$?compose_state:(active)' 'compcmd send'",
"button -label 'Include' -name Include -sensitivity '$?compose_state:(active) && $?main_state:(folder_has_messages) && !$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' 'compcmd include-message'",
"button -label 'Attachments' -name Attachments -sensitivity '$?compose_state:(active) && !$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' dialog Attachments",
"button -label 'Cancel' -name Cancel zmenu_comp_cancel",
"button -W message",
"button -label 'Next' -sensitivity '$?message_state:(is_next)' -name Next next",
"button -label 'Prev' -sensitivity '$?message_state:(is_prev)' -name Prev previous",
"button -label 'Delete' -name Delete delete",
"button -label 'Save' -name Save dialog Save",
"button -label 'Reply' -name Reply reply",
"button -label 'ReplyAll' -name ReplyAll replyall",
"button -label 'Close' -name Close dialog -close",
"button -B ToolboxItems",
"button -label 'Aliases' -name Aliases -icon alias_icon dialog Aliases",
"button -label 'Browser' -name Browser -icon addrbook_icon dialog Browser",
"button -label 'Compose' -name Compose -icon compose_icon mail",
"button -label 'Envelope' -name Envelope -icon envelope_icon dialog Envelope",
"button -label 'Headers' -name Headers -icon headers_icon dialog Headers",
"button -label 'Templates' -name Templates -icon templates_icon dialog Templates",
"button -label 'Dates' -name Dates -icon dates_icon dialog Dates",
"button -label 'Search' -name Search -icon search_icon dialog Search",
"button -label 'Sort' -name Sort -icon sort_icon dialog Sort",
"button -label 'Variables' -name Variables -icon variables_icon dialog Variables",
"button -label 'Printer' -name Printer -icon printer_icon dialog Printer",
"button -label 'Help' -name Help -icon help_icon dialog Help",
"button -label 'Buttons' -name Buttons -icon buttons_icon dialog Buttons",
"button -label 'Menus' -name Menus -icon menus_icon dialog menus",
"button -label 'Colors' -name Colors -icon paint_icon dialog Colors",
"button -label 'Filters' -name Filters -icon filters_icon dialog Filters",
"button -label 'Fonts' -name Fonts -icon fonts_icon dialog Fonts",
"button -label 'Functions' -name Functions -icon functions_icon dialog Functions",
"button -W main",
"menu -W main",
"menu -name folder -menu MainFolderMenu ",
"menu -name message -menu MainMessageMenu ",
"menu -name view -menu MainViewMenu ",
"menu -name find -menu MainFindMenu ",
"menu -name sort -menu MainSortMenu ",
"menu -name compose -menu MainComposeMenu ",
"menu -name options -menu MainOptionsMenu ",
"menu -name layout -menu MainLayoutMenu ",
"menu -name help -menu MainHelpMenu -help-menu ",
"menu -B MainFolderMenu",
"menu -n -name mfm_new_folder 'dialog NewFolder'",
"menu -n -name mfm_open_folder dialog AddFolder",
"menu -n -name mfm_rename_folder dialog RenameFolder",
"menu -n -name mfm_remove_folder zmenu_remove_folder",
"menu -n -name mfm_update update",
"menu -n -name mfm_close_fldr close",
"menu -separator -name fmsep",
"menu -n -name mfm_quit quit",
"menu -B MainMessageMenu",
"menu -name mm_read 'display'",
"menu -name mm_save dialog Save",
"menu -name mm_delete delete",
"menu -name mm_undelete undelete",
"menu -name mm_print 'dialog Printer'",
"menu -name mm_pinup 'pinup'",
"menu -separator -name __sep0",
"menu -name mm_priority -menu PriorityMenu ",
"menu -name mm_mark mark",
"menu -name mm_unmark unmark",
"menu -name mm_preserve preserve",
"menu -name mm_unpreserve unpreserve",
"menu -separator -name _sep1",
"menu -n -name mm_select_all 'msg_list *'",
"menu -B PriorityMenu",
"menu -name emp_low 'mark -Low'",
"menu -name emp_urgent 'mark -Medium'",
"menu -name emp_high 'mark -High'",
"menu -name emp_none 'mark -'",
"menu -name _sep1 -separator",
"menu -name emp_other zmenu_msg_pri_other",
"menu -B MainViewMenu",
"menu -name vm_view_all -n zmenu_unhide_all",
"menu -name vm_view_sel_only -n zmenu_view_only_selected",
"menu -name vm_hide_sel hide",
"menu -separator -name _sep0",
"menu -name vm_hide_old -n -value '$?hidden:(old)' ",
"menu -name vm_hide_del -n -value '$?hidden:(deleted)' ",
"menu -B MainFindMenu",
"menu -name mfim_all_references -menu FindAllRefMenu ",
"menu -name mfim_next_reference -menu FindNextRefMenu ",
"menu -name mfim_prev_reference -menu FindPrevRefMenu ",
"menu -separator -name _sep1",
"menu -n -name mfim_pattern dialog Search",
"menu -n -name mfim_date dialog Dates",
"menu -B FindNextRefMenu",
"menu -name nrm_same_subject zmenu_next_ref_subj",
"menu -name nrm_same_author zmenu_next_ref_auth",
"menu -name nrm_same_msgid zmenu_next_ref_msgid",
"menu -name nrm_same_priority zmenu_next_ref_priority",
"menu -name nrm_same_mark zmenu_next_ref_mark",
"menu -B FindPrevRefMenu",
"menu -name prm_same_subject zmenu_prev_ref_subj",
"menu -name prm_same_author zmenu_prev_ref_auth",
"menu -name prm_same_msgid zmenu_prev_ref_msgid",
"menu -name prm_same_priority zmenu_prev_ref_priority",
"menu -name prm_same_mark zmenu_prev_ref_mark",
"menu -B FindAllRefMenu",
"menu -name arm_same_subject zmenu_all_ref_subj",
"menu -name arm_same_author zmenu_all_ref_auth",
"menu -name arm_same_msgid zmenu_all_ref_msgid",
"menu -name arm_same_priority zmenu_all_ref_priority",
"menu -name arm_same_mark zmenu_all_ref_mark",
"menu -B MainSortMenu",
"menu -n -name sm_date 'zmenu_sort_by d'",
"menu -n -name sm_subject 'zmenu_sort_by s'",
"menu -n -name sm_author 'zmenu_sort_by a'",
"menu -n -name sm_length 'zmenu_sort_by l'",
"menu -n -name sm_priority 'zmenu_sort_by p'",
"menu -n -name sm_status 'zmenu_sort_by S'",
"menu -separator -name _sep1",
"menu -n -name sm_custom 'dialog Sort'",
"menu -B MainComposeMenu",
"menu -n -name mcm_compose mail",
"menu -n -name mcm_compose_tagit zm_compose_tag_it",
"menu -n -name mcm_compose_phonetag zm_compose_phone_tag",
"menu -name mcm_drafts -menu DraftsMenu ",
"menu -separator -name _sep0",
"menu -name mcm_reply -sensitivity '$?main_state:(folder_has_messages)' -menu ReplyMenu ",
"menu -name mcm_forward -menu ForwardMenu ",
"menu -separator -name _sep1",
"menu -n -name mcm_browser -sensitivity '$?address_book' 'dialog Browser'",
"menu -n -name mcm_templates 'dialog Templates'",
"menu -B ReplyMenu",
"menu -name rpm_replysender replysender",
"menu -name rpm_replyall replyall",
"menu -separator -name _sep0",
"menu -name rpm_sender_inc 'replysender -i'",
"menu -name rpm_all_inc 'replyall -i'",
"menu -B ForwardMenu",
"menu -name fwdm_resend 'mail -send -forward'",
"menu -name fwdm_forward 'mail -f'",
"menu -name fwdm_forward_attach 'mail -M'",
"menu -B DraftsMenu",
"menu -n -name dm_drafts zmenu_open_drafts",
"menu -name dm_send_draft -sensitivity '$?main_state:(folder_has_messages)' \"mail -q\"",
"menu -name dm_resume_draft -sensitivity '$?main_state:(folder_has_messages)' \"mail -q!\"",
"menu -B MainOptionsMenu",
"menu -n -name mom_aliases 'dialog Aliases'",
"menu -n -name mom_sig zmenu_edit_signature",
"menu -n -name mom_headers 'dialog Headers'",
"menu -n -name mom_envelope 'dialog Envelope'",
"menu -separator -name _sep0",
"menu -n -name mom_buttons 'dialog Buttons'",
"menu -n -name mom_menus 'dialog Menus'",
"menu -n -name mom_colors 'dialog Colors'",
"menu -n -name mom_filters 'dialog Filters'",
"menu -n -name mom_fonts 'dialog Fonts'",
"menu -n -name mom_functions 'dialog Functions'",
"menu -n -name mom_toolbox 'dialog Toolbox'",
"menu -separator -name _sep1",
"menu -n -name mom_variables 'dialog Variables'",
"menu -n -name mom_setup -menu SetupMenu ",
"menu -n -name mom_save_state 'saveopts -g'",
"menu -B SetupMenu",
"menu -n -name setup_ldap 'dialog Variables -C 6 '",
"menu -n -name setup_pop 'dialog Variables -C 7 '",
"menu -n -name setup_imap 'dialog Variables -C 8 '",
"menu -n -name setup_user 'dialog Variables -C 9 '",
"menu -B MainLayoutMenu",
"menu -n -name win_toolbar -value '$?main_panes:(toolbar)' zmenu_load_main_toolbar",
"menu -n -name win_title -value '$?main_panes:(status)' ",
"menu -n -name win_control -value '$?main_panes:(folder)' ",
"menu -n -name win_list -value '$?main_panes:(messages)' ",
"menu -n -name win_panel -value '$?main_panes:(buttons)' ",
"menu -n -name win_output -value '$?main_panes:(output)' ",
"menu -n -name win_command -value '$?main_panes:(command)' ",
"menu -n -name win_status -value '$?main_panes:(status_bar)' ",
"menu -B MainHelpMenu",
"menu -n -name mhm_context help -c",
"menu -n -name mhm_general help -i General",
"menu -separator -name _sep0",
"menu -n -name mhm_menus help -i \"Main Window\"",
"menu -n -name mhm_compose help -i \"Compose Window\"",
"menu -n -name mhm_read help -i 'Reading Messages'",
"menu -n -name mhm_print help -i 'Printing Messages'",
"menu -n -name mhm_reply help -i 'Replying to a Message'",
"menu -n -name mhm_saving help -i 'Saving Messages'",
"menu -n -name mhm_updating help -i Updating",
"menu -n -name mhm_opening help -i 'Opening Folders'",
"menu -n -name mhm_indexing help -i 'Folder Popup'",
"menu -separator -name _sep1",
"menu -n -name mhm_functions dialog functionsHelp",
"menu -n -name mhm_index help -t -i 'Main Window'",
"menu -separator -name _sep2",
"menu -n -name mhm_product help -i 'About This Program'",
"menu -W compose",
"menu -name message -menu ComposeMessageMenu ",
"menu -name edit -sensitivity '$?compose_state:(active)' -menu ComposeEditMenu ",
"menu -name include -sensitivity '$?compose_state:(active)' -menu ComposeIncludeMenu ",
"menu -name address -sensitivity '$?compose_state:(active)' -menu ComposeAddressesMenu ",
"menu -name options -sensitivity '$?compose_state:(active)' -menu ComposeOptionsMenu ",
"menu -name layout -menu ComposeLayoutMenu ",
"menu -name help -menu ComposeHelpMenu -help-menu ",
"menu -B ComposeMessageMenu",
"menu -n -name mm_compose mail",
"menu -name mm_reuse -sensitivity '!$?compose_state:(active)' zbutton_reuse",
"menu -n -name mm_templates -sensitivity '!$?compose_state:(active)' 'dialog Templates'",
"menu -separator -name _sep0",
"menu -n -name mm_send -sensitivity '$?compose_state:(active)' compcmd send",
"menu -n -name mm_save -sensitivity '$?compose_state:(active)' zmenu_save_to_file",
"menu -n -name mm_draft -sensitivity '$?compose_state:(active)' zmenu_save_draft",
"menu -n -name mm_print -sensitivity '$?compose_state:(active)' zmenu_comp_print",
"menu -separator -name _sep1",
"menu -name mmm_attachments -sensitivity '$?compose_state:(active) && !$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' dialog Attachments",
"menu -separator -name _sep2",
"menu -n -name com_charset -menu ComposeCharsetMenu",
"menu -n -name mm_cancel zmenu_comp_cancel",
"menu -B ComposeCharsetMenu",
"menu -n -name com_cs_sender zmenu_match_sender_charset",
"menu -n -name com_ascii compcmd charset us-ascii",
"menu -n -name com_iso_8859_1 compcmd charset iso-8859-1",
"menu -n -name com_iso_8859_2 compcmd charset iso-8859-2",
"menu -n -name com_x_macintosh compcmd charset x-macintosh ",
"menu -n -name com_x_iso_646_se1 compcmd charset x-iso-646-se1 ",
"menu -n -name com_cs_other zmenu_charset",
"menu -B ComposeEditMenu",
"menu -n -name em_cut zmenu_comp_body_textcopy cut-selection",
"menu -n -name em_copy zmenu_comp_body_textcopy copy-selection",
"menu -n -name em_paste zmenu_comp_body_paste",
"menu -name em_paste_sp -menu ComposePasteSpecialMenu ",
"menu -n -name em_delete zmenu_comp_body_textcopy clear-selection",
"menu -name em_format -menu ComposeEditFormatMenu ",
"menu -separator -name _sep0",
"menu -n -name em_select_all zmenu_comp_body_textedit select-all",
"menu -separator -name _sep1",
"menu -n -name em_search dialog SearchReplace",
"menu -separator -name _sep2",
"menu -n -name em_editor compcmd edit",
"menu -B ComposePasteSpecialMenu",
"menu -n -name psm_indent zmenu_paste_indented",
"menu -n -name psm_fill zmenu_paste_fill",
"menu -B ComposeEditFormatMenu",
"menu -n -name em_fill zmenu_comp_body_textedit fill",
"menu -n -name em_indent zmenu_comp_indent",
"menu -n -name em_unindent zmenu_comp_body_textedit unindent",
"menu -n -name em_process zmenu_comp_pipe",
"menu -B ComposeOptionsMenu",
"menu -n -name com_directory -value '$?compose_state:(directory_check)' -sensitivity '$?address_book || $?compose_state:(directory_check)' ",
"menu -n -name com_autosign -value '$?compose_state:(autosign)' ",
"menu -n -name com_autoformat -value '$?compose_state:(autoformat)' ",
"menu -n -name com_edit-headers -value '$?compose_state:(edit_headers)' -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' ",
"menu -name hdrs_priority -menu ComposePriorityMenu ",
"menu -n -name com_sendcheck -value '$?compose_state:(sendtime_check)' -sensitivity '$?address_book' ",
"menu -n -name com_return-receipt -value '$?compose_state:(return_receipt)' ",
"menu -n -name com_record-msg -value '$?compose_state:(record_msg)' ",
"menu -n -name com_phone-tag -value '$?compose_state:(phone_tag)' -sensitivity '!$?compose_state:(tag_it)' ",
"menu -n -name com_tag-it -value '$?compose_state:(tag_it)' -sensitivity '!$?compose_state:(phone_tag)' ",
"menu -n -name com_read-receipt -value '$?compose_state:(read_receipt)' ",
"menu -separator -name _sep0",
"menu -name com_options -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' dialog CompOptions",
"menu -B ComposeIncludeMenu",
"menu -name im_messages -sensitivity '$?main_state:(folder_has_messages) && !$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' -menu ComposeIncludeMessageMenu",
"menu -name im_files -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' -menu ComposeIncludeFileMenu",
"menu -B ComposeIncludeMessageMenu",
"menu -name imm_selected compcmd include-message",
"menu -name imm_forward compcmd forward-unindented",
"menu -name imm_forward_attach compcmd forward-attached",
"menu -B ComposeIncludeFileMenu",
"menu -n -name ifm_indented -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' zmenu_insert_file insert",
"menu -n -name ifm_indentedr -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' zmenu_insert_file replace",
"menu -B ComposeAddressesMenu",
"menu -n -name hdrs_aliases dialog CompAliases",
"menu -n -name hdrs_browse -sensitivity '$?address_book' dialog Browser",
"menu -n -name hdrs_check -sensitivity '$?address_book' compcmd address-check",
"menu -n -name hdrs_dynamic -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' dialog DynamicHdrs",
"menu -separator -name _sep0",
"menu -n -name hdrs_to -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' compcmd to",
"menu -n -name hdrs_subject -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' compcmd subject",
"menu -n -name hdrs_cc -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' compcmd cc",
"menu -n -name hdrs_bcc -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' compcmd bcc",
"menu -B ComposePriorityMenu",
"menu -n -name emp_low -value '$?compose_state:(pri_Low)' ",
"menu -n -name emp_urgent -value '$?compose_state:(pri_Medium)' ",
"menu -n -name emp_high -value '$?compose_state:(pri_High)' ",
"menu -n -name emp_none -value '$?compose_state:(pri_none)' ",
"menu -n -name _sep1 -separator",
"menu -n -name emp_other zmenu_comp_pri_other",
"menu -B ComposeLayoutMenu",
"menu -name lm_toolbar -n -value '$?compose_panes:(toolbar)' -sensitivity '($?compose_state:(active) || $?compose_panes:(toolbar)) && !$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' zmenu_load_compose_toolbar",
"menu -name lm_folder -n -value '$?compose_panes:(folder)' -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' ",
"menu -name lm_hdrs -n -value '!$?compose_state:(edit_headers)' -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' ",
"menu -name lm_attachments -n -value '$?compose_panes:(attachments)' -sensitivity '$?compose_state:(attachments) && !$?compose_state:(phone_tag) && !$?compose_state:(tag_it)'",
"menu -name lm_body -n -value '$?compose_panes:(body)' -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' ",
"menu -name lm_actions -n -value '$?compose_panes:(action_area)' -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' ",
"menu -name lm_status -n -value '$?compose_panes:(status_bar)' -sensitivity '!$?compose_state:(phone_tag) && !$?compose_state:(tag_it)' ",
"menu -B ComposeHelpMenu",
"menu -name chm_context help -c",
"menu -separator -name _sep0",
"menu -n -name chm_about help -i 'Compose Window'",
"menu -n -name chm_addressing help -i 'Addressing'",
"menu -n -name chm_alias help -i 'Using Aliases'",
"menu -n -name chm_add_attach help -i 'Sending Attachments'",
"menu -n -name chm_include help -i 'Including'",
"menu -n -name chm_send help -i 'Sending a message'",
"menu -n -name chm_options help -i 'Compose Options'",
"menu -separator -name _sep1",
"menu -n -name chm_index help -t -i 'Compose Window'",
"menu -W message",
"menu -name message -menu MessageMessageMenu ",
"menu -name edit -menu MessageEditMenu ",
"menu -name find -menu MessageFindMenu ",
"menu -name compose -menu MessageComposeMenu ",
"menu -name reply -menu ReplyMenu ",
"menu -name forward -menu ForwardMenu ",
"menu -name layout -menu MessageLayoutMenu ",
"menu -name help -menu MessageHelpMenu -help-menu ",
"menu -B MessageComposeMenu",
"menu -n -name cm_compose mail",
"menu -n -name cm_templates 'dialog Templates'",
"menu -B MessageMessageMenu",
"menu -name mmm_save_message dialog Save",
"menu -name mmm_delete delete",
"menu -name mmm_undelete undelete",
"menu -name mmm_print 'dialog Printer'",
"menu -name mmm_pinup 'pinup'",
"menu -separator -name _sep0",
"menu -name mmm_priority -menu PriorityMenu ",
"menu -name mmm_mark mark",
"menu -name mmm_unmark unmark",
"menu -name mmm_preserve preserve",
"menu -name mmm_unpreserve unpreserve",
"menu -separator -name _sep1",
"menu -n -name mmm_charset -menu MessageCharsetMenu",
"menu -name mmm_attachments -sensitivity '$?message_state:(attachments) && !$?message_state:(phone_tag) && !$?message_state:(tag_it)' dialog Attachments",
"menu -separator -name _sep2",
"menu -n -name mmm_done dialog -close",
"menu -B MessageCharsetMenu",
"menu -n -name mmm_ascii 'zmenu_override_in_charset \"us-ascii\"'",
"menu -n -name mmm_iso_8859_1 'zmenu_override_in_charset \"iso-8859-1\"'",
"menu -n -name mmm_iso_8859_2 'zmenu_override_in_charset \"iso-8859-2\"'",
"menu -n -name mmm_iso_8859_5 'zmenu_override_in_charset \"iso-8859-5\"'",
"menu -n -name mmm_x_macintosh 'zmenu_override_in_charset \"x-macintosh\"'",
"menu -n -name mmm_iso_646_gb 'zmenu_override_in_charset \"iso-646-gb\"'",
"menu -n -name mmm_iso_646_no 'zmenu_override_in_charset \"iso-646-no\"'",
"menu -n -name mmm_iso_646_yu 'zmenu_override_in_charset \"iso-646-yu\"'",
"menu -n -name mmm_x_iso_646_se1 'zmenu_override_in_charset \"x-iso-646-se1\"'",
"menu -n -name mmm_x_iso_646_se2 'zmenu_override_in_charset \"x-iso-646-se2\"'",
"menu -n -name mmm_x_ibm_437 'zmenu_override_in_charset \"x-ibm-437\"'",
"menu -n -name mmm_x_ibm_850 'zmenu_override_in_charset \"x-ibm-850\"'",
"menu -B MessageEditMenu",
"menu -n -name em_copy zmenu_msg_body_textcopy copy-selection",
"menu -n -name em_select_all zmenu_msg_body_textedit select-all",
"menu -separator -name _sep1",
"menu -n -name em_edit -sensitivity '!$?message_state:(plain_text) && $?main_state:(folder_writable)' edit",
"menu -separator -name _sep2",
"menu -n -name em_next_page zmenu_msg_body_textedit next-page",
"menu -n -name em_prev_page zmenu_msg_body_textedit previous-page",
"menu -n -name em_scroll_up zmenu_msg_body_textedit scroll-down",
"menu -n -name em_scroll_down zmenu_msg_body_textedit scroll-up",
"menu -n -name em_scroll_home zmenu_msg_body_textedit beginning",
"menu -n -name em_scroll_end zmenu_msg_body_textedit end",
"menu -B MessageFindMenu",
"menu -name fm_next -sensitivity '$?message_state:(is_next)' next",
"menu -name fm_prev -sensitivity '$?message_state:(is_prev)' previous",
"menu -separator -name _sep0",
"menu -name fm_next_reference -menu FindNextRefMenu ",
"menu -name fm_prev_reference -menu FindPrevRefMenu ",
"menu -separator -name _sep1",
"menu -n -name fm_search dialog SearchReplace",
"menu -B MessageHelpMenu",
"menu -name msghm_context help -c",
"menu -separator -name _sep0",
"menu -n -name msghm_about help -i 'Message Display Window'",
"menu -n -name msghm_displaying help -i 'Receiving Attachments'",
"menu -n -name msghm_replying help -i 'Replying to a Message'",
"menu -n -name msghm_print help -i 'Printing Messages'",
"menu -n -name msghm_saving help -i 'Saving Messages'",
"menu -separator -name _sep1",
"menu -n -name msghm_index help -t -i 'Message Display Window'",
"menu -B MessageLayoutMenu",
"menu -name lm_toolbar -n -value '$?message_panes:(toolbar)' zmenu_load_message_toolbar",
"menu -name lm_folder -n -value '$?message_panes:(folder)' ",
"menu -name lm_header -n -value '$?message_panes:(headers)' ",
"menu -name lm_attachments -n -sensitivity '$?message_state:(attachments) && $?message_panes:(headers) && !$?message_state:(phone_tag) && !$?message_state:(tag_it)' -value '$?message_panes:(attachments)' ",
"menu -name lm_body -n -value '$?message_panes:(body)' ",
"menu -name lm_actions -n -value '$?message_panes:(action_area)' ",
"menu -name lm_status -n -value '$?message_panes:(status_bar)' ",
"menu -separator -name _sep0",
"menu -name lm_full_headers -value '$?display_headers:(all)' -sensitivity '!$?message_state:(pinup)' zmenu_full_headers",
"menu -popup-context main-summaries",
"menu -name msp_read 'type'",
"menu -name msp_delete 'delete'",
"menu -name msp_undelete 'undelete'",
"menu -name msp_save dialog Save",
"menu -name msp_hide 'flags +H'",
"menu -name msp_pri -menu PriorityMenu ",
"menu -name msp_lpr 'lpr'",
"menu -name msp_select_all -n 'msg_list *'",
"menu -popup-context read-message-body",
"menu -n -name mpm_copy zmenu_msg_body_textcopy copy-selection",
"menu -n -name mpm_select_all zmenu_msg_body_textedit select-all",
"menu -separator -name _sep0",
"menu -name mpm_save_message dialog Save",
"menu -name mpm_delete delete",
"menu -name mpm_print 'dialog Printer'",
"menu -name mpm_reply -menu ReplyMenu ",
"menu -name mpm_forward -menu ForwardMenu ",
"menu -separator -name _sep1",
"menu -name mbp_browser -sensitivity '$?browser' 'zmenu_follow_url message-body'",
"menu -name mbp_netscape 'set browser = \"$ZMLIB/bin/tell-netscape openURL\"'",
"menu -name mbp_mosaic 'set browser = \"$ZMLIB/bin/tell-mosaic goto\"'",
"menu -popup-context compose-body",
"menu -name cbp_send -sensitivity '$?compose_state:(active)' 'compcmd send'",
"menu -name cbp_include -sensitivity '$?compose_state:(active) && $?main_state:(folder_has_messages)' 'compcmd include-message'",
"menu -name cbp_pri -menu ComposePriorityMenu ",
"menu -name cbp_attach -sensitivity '$?compose_state:(active)' dialog Attachments",
"menu -separator -name _sep0",
"menu -name cbp_cancel zmenu_comp_cancel",
"function zmenu_load_main_toolbar () {",
"if $?main_toolbar_loaded",
"return",
"else",
"if ! $?main_panes:(toolbar)",
"return",
"endif",
"endif",
"set __icons = $ZMLIB/bitmaps/toolbar",
"button -B MainToolbar",
"button -n -name Open -label 'Open' -icon $__icons/open.xbm dialog AddFolder",
"button -name Save -label 'Save' -icon $__icons/save.xbm dialog Save",
"button -name Read -label 'Read' -icon $__icons/read.xbm zbutton_read",
"button -name Delete -label 'Delete' -icon $__icons/delete.xbm delete",
"button -name Undelete -label 'Undelete' -icon $__icons/undelete.xbm undelete",
"button -name Print -label 'Print' -icon $__icons/printer.xbm dialog Printer",
"button -n -name Create -label 'Create New' -icon $__icons/compose.xbm mail",
"button -name Reply -label 'Reply' -icon $__icons/reply.xbm reply",
"button -name ReplyAll -label 'Reply All' -icon $__icons/replyall.xbm replyall",
"button -name Address -label 'Address' -icon $__icons/addrbook.xbm 'dialog Browser'",
"button -name Update -n -label 'Update' -icon $__icons/update.xbm update",
"button -W main",
"set main_toolbar_loaded",
"unset __icons",
"}",
"function zmenu_toolbar_prev () {",
"if $?message_state:(pinup) == 0",
"previous",
"else",
"error \"No previous from Pinup\"",
"endif",
"}",
"function zmenu_toolbar_next () {",
"if $?message_state:(pinup) == 0",
"next",
"else",
"error \"No next from Pinup\"",
"endif",
"}",
"function zmenu_load_message_toolbar () {",
"if $?message_toolbar_loaded",
"return",
"else",
"if ! $?message_panes:(toolbar)",
"return",
"endif",
"endif",
"set __icons = $ZMLIB/bitmaps/toolbar",
"button -B MessageToolbar",
"button -name Close -n -label 'Close' -icon $__icons/close.xbm dialog -close",
"button -name Save -n -label 'Save' -icon $__icons/save.xbm dialog Save",
"button -name Print -n -label 'Print' -icon $__icons/printer.xbm dialog Printer",
"button -name Create -n -label 'Create New' -icon $__icons/compose.xbm mail",
"button -name Reply -n -label 'Reply' -icon $__icons/reply.xbm reply",
"button -n -name All -label 'Reply All' -icon $__icons/replyall.xbm replyall",
"button -name Forward -n -label 'Forward' -icon $__icons/fwd.xbm mail -f",
"button -name Attach -n -label 'Attach' -icon $__icons/attach.xbm dialog Attachments",
"button -name Previous -n -label 'Previous' -icon $__icons/prev.xbm zmenu_toolbar_prev",
"button -name Next -n -label 'Next' -icon $__icons/next.xbm zmenu_toolbar_next",
"button -name Delete -n -label 'Delete' -icon $__icons/delete.xbm delete",
"button -W main",
"set message_toolbar_loaded",
"unset __icons",
"}",
"function zmenu_load_compose_toolbar () {",
"if $?compose_toolbar_loaded",
"return",
"else",
"if ! $?compose_panes:(toolbar)",
"return",
"endif",
"endif",
"set __icons = $ZMLIB/bitmaps/toolbar",
"button -B ComposeToolbar",
"button -name Close -n -label 'Close' -focus-condition '!$?compose_state:(active)' -icon $__icons/close.xbm 'zmenu_comp_done'",
"button -name Cancel -n -label 'Cancel' -icon $__icons/cancel.xbm compcmd cancel",
"button -name Cut -n -label 'Cut' -icon $__icons/cut.xbm zmenu_comp_body_textcopy cut-selection",
"button -name Copy -n -label 'Copy' -icon $__icons/copy.xbm zmenu_comp_body_textcopy copy-selection",
"button -name Paste -n -label 'Paste' -icon $__icons/paste.xbm zmenu_comp_body_textedit paste",
"button -name Search -n -label 'Search' -icon $__icons/search.xbm dialog SearchReplace",
"button -name Aliases -n -label 'Aliases' -icon $__icons/alias.xbm dialog CompAliases",
"button -name Address -n -label 'Address' -icon $__icons/addrbook.xbm dialog Browser",
"button -name Include -n -label 'Include' -icon $__icons/include.xbm zmenu_toolbar_include",
"button -name Attach -n -label 'Attach' -icon $__icons/attach.xbm dialog Attachments",
"button -name Send -n -label 'Send' -icon $__icons/send.xbm zmenu_toolbar_send",
"button -W main",
"set compose_toolbar_loaded",
"unset __icons",
"}",
"zmenu_load_main_toolbar",
"zmenu_load_message_toolbar",
"zmenu_load_compose_toolbar",
"menu -W main",
"button -W main",
"endif",
"cmd dq 'd \\!*; q'		# Delete a message list, then quit.",
"cmd unread 'flags \\!* U O'	# Mark messages unread.",
"if is_lite",
"if $?LANG",
"if -e $ZMLIB/locale/$LANG/system.literc",
"source $ZMLIB/locale/$LANG/system.literc",
"else",
"source $ZMLIB/system.literc",
"endif",
"else",
"source $ZMLIB/system.literc",
"endif",
"endif",
"load_custom_overrides",
NULL
};
